SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Addict
    Join Date
    May 2003
    Location
    sitepoint
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with IE fix

    I'm having problems with a float, I have my main content floated to the right and to other divs floated left. In Firefox they both float left regardless of the contents length. In IE if the post isn't long enough the second div floats underneath the content and to the right of the first div.

    http://tinyurl.com/ynwal7

    I could fix this i know if I put both divs inside one and floated, but I'm doing it this way for designs with other stylesheets. I have two other layouts based on this html setup. I'd think there'd be a fix if it can work in one browser.
    Half way to nowhere

  2. #2
    SitePoint Wizard bronze trophy DaveWoods's Avatar
    Join Date
    Dec 2004
    Location
    Derbyshire - UK
    Posts
    2,651
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    By floating your #mood container left it's floating next to the available space when in fact you don't need this floating at all.

    Simply remove the float and it should drop underneath

    Code:
    #mood {
        /*float:left;*/
        width:235px;
        background-color:#00CC00;
    }

  3. #3
    SitePoint Addict
    Join Date
    May 2003
    Location
    sitepoint
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That seems to cause an error back in Firefox, a scrollbar appears inside of the #posts div and throws everything off in the left divs, but works fine in IE/
    Half way to nowhere

  4. #4
    SitePoint Addict
    Join Date
    May 2003
    Location
    sitepoint
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well the problem seem to be with the comment form for some reason. http://tinyurl.com/3y2sgc The space that is being inserted into the left column is the same height of the form, if I take things out of the form the space shrinks accordingly. The only way I can seem to fix it is floating #mood left, but it has that small effect in IE. Normally it wouldn't be a problem since the posts will be long enough. But I'd like to find a fix just so it is styled right.
    Half way to nowhere

  5. #5
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,122
    Mentioned
    29 Post(s)
    Tagged
    2 Thread(s)
    Hello,

    <br class="clear" /> - Clears the floated form. Remove it if you don't want it to.

    code to XHTML 1.0 Strict and don't use <br>'s for clearing - with the 'lefttd' class names I was thinking you were using tables

  6. #6
    SitePoint Addict
    Join Date
    May 2003
    Location
    sitepoint
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks I fixed it, went the table route and changed the doctype.
    Half way to nowhere

  7. #7
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,122
    Mentioned
    29 Post(s)
    Tagged
    2 Thread(s)
    And how quick people turn to the dark side

    You had an element that was clearing the float like it supposed to!
    What did you expect?

    If you remove that line I pointed out it will be fine,
    but I suspect you'll keep it just to spite us CSS enthusiasts..

  8. #8
    SitePoint Addict
    Join Date
    May 2003
    Location
    sitepoint
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm confused I thought I did remove what you were pointing to?
    Half way to nowhere

  9. #9
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,122
    Mentioned
    29 Post(s)
    Tagged
    2 Thread(s)
    I didn't promote the use of a table for layout did I? I'm just kidding, glad you got sorted


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
  •