I am trying to hide the first 3 elements having the class .row
inside the block .container
.
What I'm doing is hiding all the .row
first, and then I am trying to display the first 3 .row
by using .row:nth-child(-n+3)
jsfiddle here: http://jsfiddle.net/z8fMr/1/
I have two problems here:
- Row 3 is not displayed, am I using nth-child in the wrong way?
- Is there a better practice than hiding everything and then creating a specific rule to display the n first elements that I want? Is there a way in css to just display the first 3
.row
and then hide all the other.row
?
Thanks.