I am learning html/css and I am stuck in creating a menu bar with drop down list which shows on hover. The code is written below. The problem is the drop down menu is not shown when i hover the mouse over it. Please help me out with whats wrong?
CSS:
#hi{background-color:grey;}
#hi ul{color:white; list-style-type:none; position:relative; }
#hi ul li{display:inline-block;}
#hi ul li:hover {background-color:orange;}
#hi ul li:hover ul{display:block;}
#hi ul ul{display:none; position:absolute;}
Code:
<div id="hi">
<ul>
<li>A</li>
<ul><li>b</li>
<li>c</li>
<li>d</li>
</ul>
<li>E</li>
<ul><li>f</li>
<li>g</li>
<li>h</li>
</ul>
<li>I</li>
<ul><li>J</li>
<li>k</li>
<li>l</li>
</ul>
</ul>
</div>