HTML CSS examples for CSS Widget:Menu Bar
Menu bar items with the same width
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> ul {<!-- ww w . ja v a2s . c om--> padding:0; display:table; width:100%; background:hotpink; table-layout:fixed; } li { display:table-cell; } a { display:block; padding:2em; text-align:center; background:white; } a:hover { background:lime; } </style> </head> <body> <ul> <li> <a href="#">Lorem ipsum</a> </li> <li> <a href="#">Lorem</a> </li> <li> <a href="#">Lor</a> </li> <li> <a href="#">Lore</a> </li> <li> <a href="#">Lorem ipsum</a> </li> <li> <a href="#">Lorem ipsu</a> </li> </ul> </body> </html>