SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    Git-R-Done
    Join Date
    Nov 2001
    Posts
    1,194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Problem with float clearing in IE 5.01

    I am using overflow:hidden to clear two floats in a div and am using height: 1% to clear them in IE 6+. For some reason neither one of the floats appear in IE 5.01 and I was wondering if anyone knows of a hack that is specific to this browser to resolve the problem.
    John Saunders

  2. #2
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    As far as I know the haslayout height 1% is working in IE 5 on Windows ? maybe show your code or even better a link to your problem page , Please

  3. #3
    Git-R-Done
    Join Date
    Nov 2001
    Posts
    1,194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't have it online yet, but here's the bits of code I'm using:

    Code:
      <div id="main">
        <div id="sidebar">
    <p>blah</p>
        </div>
    
        <div id="content">
    <p>blah</p>
        </div>
      </div>
    Code:
    #main {
      overflow: hidden;
    }
    
    #sidebar {
      float: left;
      width: 200px;
    }
    
    #content {
      float: left;
      margin-left: 20px;
      width: 500px;
    }
    Code:
    /* stylesheet loaded using conditional comments for ie7 and below */
    #main {
      height: 1&#37;;
    }
    John Saunders

  4. #4
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    This seems to work ? conditional comments on a PC don't always work ? and IE 5 don't likes the overflow hidden on the wrapper

    use
    head+body #main{overflow:hidden;}

  5. #5
    Git-R-Done
    Join Date
    Nov 2001
    Posts
    1,194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    THANKS! You rock!
    John Saunders

  6. #6
    Git-R-Done
    Join Date
    Nov 2001
    Posts
    1,194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Any idea how to fix this for older netscape browsers? (since overflow:hidden doesn't work and they don't see ie conditional comments)
    John Saunders

  7. #7
    Non-Member
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    4,300
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello

    Use the PIE way of float clearing


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
  •