SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jan 2008
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE pains with floating elements

    I need help with my site at http://www.mildlyhotpeppers.com/ - I'd Google for a solution but I can't exactly tell what the problem is.

    If you look at my site in Firefox, everything (I think) works out right, especially the sidebar. In IE, however, the sidebar doesn't float to the right, or it's not doing what I expected it to do. The sidebar aligns to the right, but it's positioned after everything else. It's sort of hard to explain, and easiest to see through the browser.

    Can anyone tell me why this is happening?

    //Edit: Nevermind, I moved the sidebar before the content and it works fine.

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,556
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    HI,

    Because you haven't given a width to your floated left column then it will try and assume a 100% width especially if you make inner elements 100% wide.

    e.g.
    remove the 100% widths from these 2 elements to see what I mean.

    Code:
    #archive_comic {
    /*width:100%;*/
    }
    
    #archive_movie {
    /*border-top:thin solid;*/
    width:100%;
    }
    The left floated column really should have a width because any line of text will always try to push the float to 100% wide otherwise.


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
  •