SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
Thread: Goodbye Clearing Div's
-
May 12, 2004, 08:38 #1
- Join Date
- Jan 2004
- Location
- Chipping Campden, UK
- Posts
- 403
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Goodbye Clearing Div's
Hi
Tony, from www.csscreator.com has just posted this:
http://www.csscreator.com/attributes/containedfloat.php
It shows how to clear those pesky div's without the:
<div class="clear"></div>
hack.
He shows a pseudo element solution that works! He has taken all the clearing bits from the css-creator forum with no ill effects!
One word of warning though, it may be that you need a space before the opening curly brace to get round a bug in IE. You will see in his code that the holly hack part has the space, but the other doesn't, so I would add it, per this site's findings:
http://www.maxgeek.com/ie6pebug/
Trevor"Good artists copy, great artists steal."
- Pablo Picasso
The image of ClevaTreva is drawn by Rhys, and is a GOOD likeness
-
May 12, 2004, 09:32 #2
- Join Date
- Jun 2001
- Location
- outside my mind
- Posts
- 900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Simply awesome.
My XHTML is now much cleaner and more semantic than before. Great find.
-
May 12, 2004, 09:53 #3
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Thanks for the tip Trevor it will come in useful
Bookmarks