I want to select only the very first links from “dropdown menu” (the ones with “ONE” text), but :first-child selects them all.
Link:
Sorry for the mess in the HTML part, but I’m customizing WordPress theme and it produces so many classes and ids.
The most important thing is at the end of CSS file.
Change your CSS selector to this…
(i.e. put pseudo class
:first-childon theli, not thea).See it on jsfiddle.net
The old selector didn’t work because
ais always the first child of thelielements.But in the new selector, the
liis the first child of theulelements.