Got a list with 3 items. Upon hovering over a item information shall be displayed.
Works fine within same <DIV>
.
How about displaying information from another <DIV>
, I guess this should be possible, isn t it?
Initially only the three lisitings are displayed. When hovering over listing 2 the content of #special can be displayed, no problem.
When hovering over listing 3 the content of #AlsoSpecial is not displayed, Why?. Is there a remedy?
样本:
<div id="top">
<ul>
<li class="left">listing 1</li>
<li class="center">listing 2</li>
<li class="right">listing 3</li>
<li><div id="special">
<p>bla1bla1bla1</p>
</div></li>
</ul>
</div>
<div id="content">
<div id="AlsoSpecial">
<p>bla2bla2bla2</p>
</div>
</div>
Sample CSS:
#top > li {display:inline;}
/*this works fine*/
div#special {display:none;}
.center:hover div#special {display:block;}
/*this does not work, WHY?*/
div#AlsoSpecial {display:none;}
.right:hover div#AlsoSpecial {display:block;}