Clear floats without structural markup (CSS)

October 14, 2007 at 5:37 pm Leave a comment

“.clearfix” is the container that holds all of your floated elements. Works in all browsers that support “float” and “clear”.

display: inline-table;
/* Hides from IE-mac \*/
height: 1%;
display: block;
/* End hide from IE-mac */

html>body .clearfix
height: auto;
content: “.”;
display: block;
height: 0;
clear: both;
visibility: hidden;


Entry filed under: css.

some more tech links min-height for IE (and all other browsers)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

Flickr Photos

Blog Stats

  • 720,244 hits

%d bloggers like this: