How to clear a floated element?
Follow the following steps :-
- The Empty Div Method - Create an empty div like this -
<div style="clear: both;"></div>
- The Overflow Method - Overflow property can be used to get the desired output.
- The Easy Clearing Method - Use the CSS pseudo selector
:after
.