We are trying to get our HTML much more semantic and the one thing that seems to linger in our HTML that has to do with presentation is
<div class="clear"></div>
For example, if we have the following semantic html:
<div class="widgetRow">
<div class="headerInfo">My header info</div>
<div class="widgetPricing">$20 to $30</div>
<div class="footerInfo">My footer info</div>
</div>
And I have headerInfo and footerInfo both floated left in the CSS and widgetPricing floated right (just as an example).
The Question:
My widgetRow div doesn't have any height or width. Is it wrong to add <div class="clear"></div>
right after .footerInfo ? It seems that I'm not being semantic at that point.
The More Generic Question
When writing semantic HTML, is it ok to put a div in your HTML whose only job is to clear the floats?