HTML CSS examples for CSS Layout:Absolute Position
Absolute positioning ul inside another ul
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> ul.l2 {<!-- w w w . j a va 2 s. c o m--> background-color:Chartreuse; display:none; position:absolute; z-index:100; } .menu li:hover ul.l2 { display:block; } </style> </head> <body> <div id="wrapper"> <ul class="menu"> <li> item 1 <ul class="l2"> <li>item 1.1</li> <li>item 1.2</li> </ul> </li> <li>item 2</li> </ul> </div> </body> </html>