That's certainly another way to do it, though not the favored one (since it adds unnecessary markup to the HTML). Another common tactic is to use the "clearfix" method.
E.g.
Code:
#content:after {
content:" ";
display:block;
height:0;
clear:both;
visibility:hidden;
}
or the more generic version (you just add the .cleardif class to any element that needs clearing):
Code:
.clearfix:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
.clearfix { display: inline-block; }
/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* stop commented backslash hack */
Bookmarks