I want to use CSS to show div id='b'
when I hover over div id='a'
, but I cannot figure out how to do it because the div 'a'
is inside another div
that div 'b'
is not in.
<div id='content'>
<div id='a'>
Hover me
</div>
</div>
<div id='b'>
Show me
</div>
we just can show same label div on hovering like this
<style>
#b {
display: none;
}
#content:hover~#b{
display: block;
}
</style>