Relative Content

Tag Archive for css-selectors

CSS Grid: change background colour of certain row

.grid-container { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; grid-template-rows: auto auto auto auto; background-color: lime; } I have this code and I want to change the background colour of the fifth last row. I know I need to use nth-last-child. Someone can tell me the code? css-selectors New contributor michaelmichael is a new contributor […]

use :nth-child() in complicated tags

I want to style the text “want to select this” in the code below, but I don’t know how to select it because it’s after a closed tag and before another one.