HTML CSS examples for CSS Widget:Menu Bar
HTML CSS ul <li> auto width to create menu bar
<html> <head> <title>Lorem ipsu</title> <style> body {<!-- ww w. jav a2 s .c o m--> background:Chartreuse; margin:0 auto; } .container { width:721px; border:2px solid yellow; padding:6px; } .menu-list { padding:0; margin:0; width:100%; border-bottom:0; } .menu-list li { display:table-cell; width:2%; float:none; border:2px solid blue; margin:3px; padding:11px; text-align:center; } </style> </head> <body> <div class="container"> <ul class="menu-list"> <li> <a href="#">Lorem </a> </li> <li> <a href="#">Lorem </a> </li> <li> <a href="#">Lorem </a> </li> <li> <a href="#">Lorem </a> </li> <li> <a href="#">Lorem </a> </li> </ul> </div> </body> </html>