How to show the first N elements of a block and hide the others in css?
You have a .notarow as the first child, so you have to account for that in your :nth-child() formula. Because of that .notarow, your first .row becomes the second child overall of the parent, so you have to count starting from the second to the fourth: .row:nth-child(-n+4) { display: block; } Updated fiddle .row { … Read more