How would I make this into an dynamic :nth-child css selector -
this question has answer here:
i'm working on diamond grid system css, , need move 5th block, , 12th, 19th, 26th , on left. how make dynamic nth selector?
.diamond-grid > div:nth-child(26), .diamond-grid > div:nth-child(19), .diamond-grid > div:nth-child(12), .diamond-grid > div:nth-child(5) { margin-left: 182px; }
the solution can find here: https://css-tricks.com/how-nth-child-works/
in situation, think need :nth:child(7n+5){ }
explanation:
7n
steps have set, 5
starting element.
Comments
Post a Comment