CSS – clear both – clearfix

.floatingDiv:after {
       content: '.';
       height: 0;
       width: 0;
       clear: both;
       visibility: hidden;
}

With this trick, you don’t need to remember to use clear: both on the next div you don’t want it to float.

This entry was posted in Web Design. Bookmark the permalink.

Leave a Reply