RulerNature RulerNature - 2 months ago 5
CSS Question

Select only the middle using nth(child, of-type,)

I’m trying to match some elements from my table using nth-child or nth-of-type or every kind of “nth” but I’m stuck targeting elements from the middle selected on picture below in color green, can someone give me a idea how to do that, I don’t want to repeat an interval just want to select that section. I don't want to use javascript or jQuery for this.

enter image description here

small fide example:

.row:nth-child(n+4) .cell:nth-child(n+4) {
background: green;
color: red;


This is the answer of my problem, I have solved myself !

.row:nth-child(n+4):nth-child(-n+6) .cell:nth-child(n+4):nth-child(-n+6){