Possible Duplicate:
CSS previous sibling selector
I'm exploring CSS3 and all I can do with only pure HTML/CSS3, and I've come across a little problem I can't find a solution to.
I have a few <div>
s with the style float:left;
. When I hover on the first one, I want to apply some CSS to the second one. Pretty easy, I just use div.div1:hover + div
and it's all good. But what about the other way around? If I hover the second <div>
, how can I apply some CSS to the first <div>
?
I can use any CSS, I don't really care about browser compatibility, I just want to explore how far I can go with pure CSS3.