html - Select specific div class using nth-child -
please have @ http://jsfiddle.net/kv7uq/1/
.productlist div.grid:nth-child(4n+5){ clear:left; }
what i'm trying achieve create 4 column grid. above code used in fiddle seems fine - if @ fiddle there no 4 column grid.
<div class="pagenav"></div> <div class="pageheading"></div>
the above 2 divs child divs of container div, , located prior grid divs causing conflict. if 2 divs removed, grid comes out fine. i'm not sure if fixable, please - thank you.
just offset 2 compensate divs. instead of +5
, use +3
.
.productlist div.grid:nth-child(4n+3){ clear:left; }
if don't want first box have clear: left
+7
.
Comments
Post a Comment