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

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -