I have a grid system for my site that was originally set up with a style that applies to every sixth element in the grid
li:nth-child(5n+1){ margin-left:0 }
I am making my site responsive and I have a breakpoint where I point
li:nth-child(3n+1){ margin-left:0 }
But the problem is that it still interprets the previous 5n + 1 style, which I don't want. How to tell CSS to ignore this style. Or even better, how to create a fluid grid, so that whenever the li element is the first in the line, it has a left edge from 0, and all the others have a margin of, say, 25px?
source
share