SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist ClevaTreva's Avatar
    Join Date
    Jan 2004
    Location
    Chipping Campden, UK
    Posts
    403
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking 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

  2. #2
    Back in Action Winged Spider's Avatar
    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.


  3. #3
    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)
    Thanks for the tip Trevor it will come in useful


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
  •