tomatoKetchup Posted December 1, 2014 Share Posted December 1, 2014 Hello, Let's say I have 2 <div>, one wiith id=A and one with id=B I want that, when hovering the mouse cursor to #A, the div #B performs an animation (let's say a transition). Is that possible with CSS? Thanks for reading, tomatoKetchup Link to comment Share on other sites More sharing options...
dsonesuk Posted December 1, 2014 Share Posted December 1, 2014 Only if id="b" is sibling to id="a" #A:hover + #B {...} <div id="A">ggggg</div> <div id="B">ggggg</div> or #A:hover ~ #B {...} this shouuld work but test first <div id="A">ggggg</div> <div id="Aa">ggggg</div> <div id="B">ggggg</div> this won't work <div id="A">ggggg</div> <div id="Aa">ggggg <div id="B">ggggg</div> </div> as now "B" is child of "Aa" and so is not a sibling element to "A" any longer, but "Aa" is a sibling to "A". Link to comment Share on other sites More sharing options...
tomatoKetchup Posted December 1, 2014 Author Share Posted December 1, 2014 Ok I see, thanks for your answer. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now