Archive

Archive for the ‘Tricks & Tips’ Category

Excellent CSS Tip : Clearing Floats

November 15th, 2008

Over at Jim Nearth’s blog is a great quick blog post that every web developer should take a look at.

Self Clearing Floats in CSS

div#container
{
  height: 1%;
}

div#container:after
{
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

Very simple, huh… Just gotta love that little snippet of code.

Tricks & Tips