CSS - Drop Line Menu Problem -



CSS - Drop Line Menu Problem -

i cant seem css positioning right new line drops links when user hovers on category sub categories.

i wondering how can accomplish this?

i have many sub sub categories 6 levels deep allow know.

here css.

#nav-container { border-top: 2px solid #000000; float: left; font-weight: bold; margin: 0; padding: 5px 0px; width: 100%; background: #0098ff; list-style-type: none; } #nav-container ol { list-style-type: none; margin: 0 auto; padding: 0px; text-align: left; width: 1024px; } #nav-container li { float: left; margin: 0px; padding: 0px; width: auto; } #nav-container ol h2 { font-size: .9em; margin: 0px; width: 236px; float: left; } ul.cat-container li { display: none; } ul.cat-container > li { display: list-item; } ul.cat-container li:hover > ol > li { display: list-item; } ul.cat-container ol { list-style-type: none; margin: 0 auto; padding: 0px; text-align: left; width: 1024px; position: absolute; left: 0; top: 440; } ul.cat-container ol li { float: left; margin: 0px; padding: 0px; width: 246px; }

and here html.

<div id="nav-container"> <ol> <li> <ul class="cat-container"> <li class="cat-header"> <h2><a href="#"class="header">first nested list</a></h2> <ol> <li><a href="#">second nested list</a></li> <li><a href="#">second nested list</a></li> </ol> </li> <li class="cat-header"> <h2><a href="#" class="header">first nested list</a></h2> <ol> <li><a href="#">second nested list</a></li> <li><a href="#">second nested list</a></li> </ol> </li> <li class="cat-header"> <h2><a href="#" class="header">first nested list</a></h2> <ol> <li><a href="#">second nested list</a></li> <li><a href="#">second nested list</a> <ol> <li><a href="#">third nested list</a></li> <li><a href="#">third nested list</a> <ol> <li><a href="#">fourth nested list</a></li> <li><a href="#">fourth nested list</a></li> </ol> </li> <li><a href="#">third nested list</a> <ol> <li><a href="#">fourth nested list</a> <ol> <li><a href="#">fifth nested list</a></li> <li><a href="#">fifth nested list</a></li> </ol> </li> <li><a href="#">fourth nested list</a></li> </ol> </li> <li><a href="#">third nested list</a></li> </ol> </li> <li><a href="#">second nested list</a></li> </ol> </li> </ul> </li> </ol> </div>

normally done javasript or jquery, changing visibility when user hovers on submenu.

a pure css solution tricky , requires hover psuedo-class, this page walks through how it.

css

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -