- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hy fellows (my first post on the forum)
I want to use nth-child to style each list item differently. It works for me when is just a list. But I don’t know how to select it when its a link there
CSS
nav ul li:nth-child(2) { color: white ;
}
html
Thanks in advance.
Here you go! Very simple – just have to add the ‘a’ after li:nth-child(2)!
Oh Thanks Doc.
Why doesn’t it work when I use 3rd?
I used ul li:nth-child(3rd) ..
Thanks!
And sorry for my stupid question..
It tooks me an hour to discover this answer
Here you go! Very simple – just have to add the ‘a’ after li:nth-child(2)!
Thanks! Very useful tools. Why haven’t I used it before? I see that I can choose the framework and even its version. Bookmarked!