When I add divs together with the objects that I use nth-child on, it seems to get buggy.
I'll appreciate any help with this.
<html>
<style>
.documents > a:nth-child(2) {
border:1px solid red;
}
</style>
<div class="documents">
<!-- NO DIVS: WORKS FINE -->
<a href="#">Test</a>
<a href="#">Test</a>
<a href="#">Test</a>
<a href="#">Test</a>
</div>
<br />
<div class="documents">
<div></div><!-- ONE DIV: STARTS WITH THE FIRST OBJECT -->
<a href="#">Test</a>
<a href="#">Test</a>
<a href="#">Test</a>
<a href="#">Test</a>
</div>
<br />
<div class="documents">
<div></div><div></div><!-- TWO DIVS: DOES NOT WORK -->
<a href="#">Test</a>
<a href="#">Test</a>
<a href="#">Test</a>
<a href="#">Test</a>
</div>
</html>
http://jsfiddle.net/nwrhU/