HTML CSS examples for CSS Widget:UL Alignment
Aligning <li> next to each other
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #menu-container { background:Chartreuse; border-radius:0; display:inline-block; width:100%; margin:0px; } .menu-left ul { margin:0; padding:0; font-size:18px; width:100%; } .menu-left ul li { display:inline-block; vertical-align:top; width:31%; } .menu-left ul li a { color:yellow; text-decoration:none;<!-- w w w . j a va 2s . c o m--> outline:none; padding:16px 0; display:block; background:blue; transition:all 2s ease; text-align:center; } .menu-left ul li a:active, .menu-left ul li a:hover { background:pink; } </style> </head> <body> <div id="menu-container"> <div class="menu-left"> <ul id="menu-principal" class="menu"> <li> <a href="">Hola</a> </li> <li> <a href="">Hola2</a> </li> </ul> </div> </div> </body> </html>