What is the most appropriate HTML5 element to use for "clear: both;" Goals?
I have:
<section>
<ul>
<li>....</li>
<li>....</li>
<li>....</li>
..
</ul>
</section>
I want to <li>float to the left and at the end of these <li>, right after </ul>I needed to place an element of how clear: both;to preserve the integrity of the block section.
Which html5 element would be most suitable for this purpose? Should I follow the invisible hr? a div?
Thank.
+5
2 answers
You can use . clearfix for this. Write like this:
ul:after{
content:'';
display:block;
clear:both;
}
+3