SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2010
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    simple css issue

    hi there,

    i have been working on a template but there is an issue with my radio buttons' text / options that have been bugging me.

    in IE 7, and possibly other IE browsers, the text beside the radio buttons are showing centered. i want them to sit flushed left beside the radio buttons. i have tried googling it but none of my changes worked, maybe its my template. can anyone help please? (in Firefox it displays correctly how it should)

    example is on the polls section on the left column at: http://www.wellingboroughnorthants.com/

  2. #2
    SitePoint Wizard donboe's Avatar
    Join Date
    Jun 2010
    Location
    Netherlands
    Posts
    2,162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The alignment for the td, holding the poll responses, is set to center. Did you try to set it to left?
    “Good artists copy, great artists steal” (Pablo Picasso - 1934)

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2010
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the only center tags i found in the css file are

    div.yagendoo_gk_news_image_1_preloader {
    background: #000 url('../images/load.gif') no-repeat center center;
    }

    i tried changing these to left but it made no difference

  4. #4
    Non-Member
    Join Date
    Jun 2010
    Location
    47°27′35″N 26°18′0″E
    Posts
    1,789
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try floating left the <label>s.

    Something like:

    Code:
    .pollstableborder td label { float:left; }
    Untested, but you're getting the idea.



    The problems, though, are many for your site, and you should consider taking measures, even if that means coding w/o a CMS

    You should at least, drop the tables for layout, drop the classes on almost every significant parent element, get rid of inline CSS, get rid of deprecated attributes, start a REAL CSS.

  5. #5
    SitePoint Wizard Stomme poes's Avatar
    Join Date
    Aug 2007
    Location
    Netherlands
    Posts
    10,283
    Mentioned
    51 Post(s)
    Tagged
    2 Thread(s)
    Those "centers" are background-image positioning. They have nothing to do with the centering of HTML elements on your page, so you can set those back to what they were.

    What donboe is talking about is this, in your HTML (not your CSS):

    Code:
    <table width="95%" border="0" cellspacing="0" cellpadding="1" align="center" class="poll">
    <thead>
    	<tr>
    
    		<td style="font-weight: bold;">
    			What requires most improvement in Wellingborough?		</td>
    	</tr>
    </thead>
    	<tr>
    		<td align="center">
    If you put an ugly background colour on that td, and then different background colours on the inner td's inside, you'll see that while the inner td's are aligned left (the radio buttons inside are as left as they can be), they themselves are forced to center because you have the align=center on that td I highlighted above.

    So, you should get everyone moved over to the left if you just remove the align="center" there. You shouldn't have to say "left" as that's the default.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •