It seems that the community here agrees that the old "clearfix" hack has now been depreciated and superseded by overflow:hidden
. Unfortunately there are situations where even using this method causes problems. (For example: This would look like this if it worked correctly.)
The main problem with using the old fashioned <div class="clear">
seems to be that it creates a div
element for sole purpose of altering the presentation -- which seems to be muddying the ideal of pure semantic markup with presentation.
Other than that, though, it appears to work well with all browsers and in all situations (which cannot be said for "clearfix" or overflow:hidden
).
Are there any other drawbacks to using clear:both
? Is it really that bad to use? Or is it just personal preference?