With the following markup i want a CSS selector to select all but the first select menu within each options div - of which there may be many:
You need to select the option div
s instead of the select
s when using :not(:first-child)
, because every select
is the first (and only) child of its parent div
:
div.options > div:not(:first-child) > select
An alternative to :not(:first-child)
is to use :nth-child()
with a starting offset of 2, like this:
div.options > div:nth-child(n + 2) > select
Another alternative is with the general sibling combinator ~
(which is supported by IE7+):
div.options > div ~ div > select