I\'m trying to create a 3-column blog layout in CSS. For each new post, there will be a new div added dynamically inside of a container div.
However, I\'m running into t
You can use the css selector nth-child to apply clear to each third element.
clear
CSS
.box:nth-child(3n + 1) { clear: both; }
Demo
How nth-child works
Note: nth-child is not supported by IE8 and less.
nth-child