SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
-
Sep 20, 2007, 09:06 #1
- 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
-
Sep 20, 2007, 09:18 #2
- 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
-
Sep 20, 2007, 09:22 #3
- 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%; }
John Saunders
-
Sep 20, 2007, 09:47 #4
- 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;}
-
Sep 20, 2007, 14:07 #5
- Join Date
- Nov 2001
- Posts
- 1,194
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
THANKS! You rock!
John Saunders
-
Sep 21, 2007, 10:11 #6
- 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
-
Sep 21, 2007, 10:15 #7
- 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