HTML CSS examples for CSS Widget:UL Element
Margin for nested UL list
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #content-sidebar li { margin-bottom:11px; } .content-sidebar-box {<!-- www . j ava2 s. co m--> background:blue } .content-sidebar-submenu { background:red; } #content-sidebar .content-sidebar-submenu li { margin-bottom:0; } </style> </head> <body> <div id="content-sidebar"> <ul> <li class="content-sidebar-box"> <a>Lore</a> <div class="content-sidebar-submenu"> <ul> <li> <a>Lorem ips</a> </li> <li> <a>Lorem ips</a> </li> <li> <a>Lorem ips</a> </li> </ul> </div> </li> <li class="content-sidebar-box"> <a>Lore</a> <div class="content-sidebar-submenu"> <ul> <li> <a>Lorem ips</a> </li> <li> <a>Lorem ips</a> </li> <li> <a>Lorem ips</a> </li> </ul> </div> </li> </ul> </div> </body> </html>