How do I create a menu that appears on hover?

alexmor

New Member
I have a menu I created that I would like to appear on hover over of an image. How do I write the css to create that? This is my menu:\[code\]<ul id="options" class="optionsMenu"> <li>A</li> <li>B</li> <li>C</li> <li>D</li> <li>E <ul> <li>E1</li> <li>E2</li> <li>E3</li> <li>E4</li> </ul> </li> <li>F</li> <li>G</li> </ul>\[/code\]I would like it to stay hidden and only appear when I hover over the following image:\[code\]<img src='http://stackoverflow.com/questions/14586901/...image.png' alt='Options Menu' id="optionsMenuTree"/>\[/code\]I think I need to do something like this:\[code\]#options ul.optionsMenu ul{ display: none; visibility: none;}#optionsMenuTree:hover > ul { display: block;}\[/code\]But I cannot get it to work right. Any help?
 
Back
Top