i dialy deal with float: left;
and the CSS-reset by Eric Meyer with class="clearfix"
. But there is one special case, i wonder how to clear a floatd element correctly: Within <ul> ... </ul>
.
Correct height, but the HTML-code ist not valid!
<ul>
with valid code?Thanks, Johannes
Simply add overflow: hidden
to the ul
element's ruleset. Search for 'clearing floats' on Google or Stack Overflow for other solutions, though in this case this should be the cleanest.
jsfiddle demo: http://jsfiddle.net/9sxrN/1/