Reputation: 1
Can't get the syntax for :nth(3) selector on this a tag, in the 3rd li tag. What a mouthful. Is it even possible?
On this website
www.cutlassandcane.com/shopping/
I am trying to change the color of the 3rd menu item. Bandoli to have red font. It is prestashop so I cannot add span tags around it, asit was cause issues elsewhere.
So, my question is, is there a way to do it through CSS using the 3 rd child, or nth, selector?
.sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/
color:black;
font-size:14px;
}
Upvotes: 0
Views: 136
Reputation: 228162
You can use :nth-child()
, like this:
.sf-menu > li:nth-child(3) > a {
color: #c0474c;
}
Note that :nth-child()
is only supported in modern browsers. It doesn't work in IE8 or lower.
Upvotes: 2