- one
- 1.1 one point one
- 1.2 one point two
<ul>
<li> 2.1 two point one</li>
<ul>
<li> 2.1.1 two point one point one </li>
<li> 2.1.2 two point one point two </li>
</ul>
</ul>
<li>three</li>
<ul>
<li> 3.1 three point one </li>
</ul>
</ol>
</body>
CSS
ol ul{
display:none
}
ol{
color:purple;
}
li:hover{
color:red;
}
ol:hover > ul{
color:red;
display:block;
}
ul:hover > ul{
color:blue;
display:block;
}
Question:
1 When the command says “ol:hover > ul” the styling should be executed only for the ul just beneath(immediate child) an ol which is being hovered over. But all the ul child of ol displays even if one of the ol is hovered over. Why? Pls explain
2 Another issue is that i want the display to emerge only when the exact text is hovered on, but the collapsibles emerge even if the mouse hovers on the spaces parallel to the text. How to resolve this?