HTML and CSS Reference
In-Depth Information
...
</div>
<div class=”sidebar” role=”complementary”>
...
</div>
<div class=”clear”></div>
</div>
Then use CSS to select the empty element to clear it:
.clear {
clear: both;
}
Figure 8-6 shows this solution works perfectly in all browsers, but it means adding an empty element to the page,
which goes against best practice. So is there a better technique?
Figure 8-6 The browser window zoomed out to show the columns cleared by an empty HTML tag.
Search WWH ::




Custom Search