Struggling to apply a min-height
to a floated DIV in an XHTML or HTML document. The workaround of nesting a fixed-height DIV and clearing it with :after
is ineffective. Directly setting a min-height
does not produce the desired result.
The current code, while functional on Firefox in quirks mode, needs improvement for broader compatibility:
<div style="float:left">
<div style="float:left; height:200px"><!-- min-height hackfix --></div>
CONTENT GOES HERE
<div style="clear:both;"></div>
</div>