Selectors in action - step by step tutorial

Step 19 - clearing the contents

In an ideal world, a simple “clear:both” applied to the footer <div> would be enough to clear the content and allow the footer to flow across the bottom of the page. However, Internet Explorer 5 and 5.5 will not tile the background image to the very bottom of the containers unless there is a new item that is clear of the floats but still inside the containers. For this reason, an empty <div> is used, and styled with an ID selector to "clear:both". It is also given a height.

#cleardiv
{
clear: both;
height: 1em;
}

View step 19 »

Go to Step 20 »

Other Max Design articles and presentations
Associated with webstandardsgroup.org