We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

wintondeshong on 06/26/07


Tagged

css clear xhtml


Versions (?)


Who likes this?

4 people have marked this snippet as a favorite

jonhenshaw
basicmagic
neuroasis
shellydennison


clearfix:after


Published in: CSS 


URL: http://www.andystates.com/

Eliminates the need for extra xhtml elements to resolve height inheritance when floating elements with CSS.

  1. .clearfix:after{
  2. content: ".";
  3. display: block;
  4. height: 0;
  5. clear: both;
  6. visibility: hidden;
  7. }

Report this snippet 

You need to login to post a comment.