So I’ve got 7 to 12 divs all of the same style which are floated left. I am looking for a css selector for all the ones that flow to a second row. I am pretty sure this is not possible with standard css, but I am wondering if anyone knows any jQuery or other tricks that could get this done. Thanks a bunch!
Share
As you say your self, there is no way to do that with CSS (that I know of). However, it can be done quite easily with jQuery.
One way to do it would be to use a combination of filter and offset to only keep the elements with higher top offset than the others (those who doesn’t fit on the first row).
Here is a demo as well: http://jsfiddle.net/8ppJP/1/