HTML CSS examples for CSS Widget:UL
Positioning nested ul
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #menu<!--from w ww .ja va 2 s . c o m--> { position:absolute; left:100px; } #menu>ul>li { background-color:Chartreuse; float:left; padding:11px; } #menu>ul>li>ul { position:absolute; width:301px; left:0px; margin-top:11px; } #menu>ul>li>ul>li { background-color:yellow; color:blue; float:left; padding:11px; } </style> </head> <body> <div id="menu"> <ul> <li>Lore</li> <li>Lorem ipsum do <ul> <li>Lorem ipsum</li> <li>Lorem ipsum dolor s</li> </ul> </li> <li>Lorem ipsu</li> </ul> </div> </body> </html>