Possible Duplicate:
CSS all inclusive sibling selector
CSS3 has an adjacent sibling selector +, and a general sibling selector ~. Is it possible to select all siblings? (the “general” selector actually only selects the following siblings)
For example, in this example, I would like all the non-hovered a-tags to get smaller, not just the tags that follow the hovered one.
HTML
<a href='#'>Item 1</a>
<a href='#'>Item 2</a>
<a href='#'>Item 3</a>
CSS
a { font-size: 15px; }
a:hover ~ a { font-size: 12px; }
No, there is no such sibling selector in Selectors 3.
Although you can select elements that aren’t being hovered using the
:not()pseudo-class, asa:not(:hover), you can’t select all of them relatively to some otherathat is currently being hovered or only while it is being hovered.