HTML CSS examples for CSS Widget:Nav Bar
Navigation bar with top and bottom border
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .menu {<!-- w w w .j a v a2 s .c o m--> font-family:Verdana, Arial; position:fixed; background:transparent; width:100%; top:100px; left:0; padding:0; text-align:center; font-size:13px; font-weight:601; border-bottom:2px solid Chartreuse; border-top:2px solid yellow; } .ty-menu__items { list-style-type:none; margin:0; padding:0; overflow:hidden; text-align:center; } .ty-menu__item { display:inline-block; margin:0px 51px; } .ty-menu__item a { padding:21px } a:link, a:visited { display:block; width:100%; font-weight:light; color:blue; background:transparent; text-align:center; text-decoration:none; text-transform:uppercase; } a:hover, a:active { padding-bottom:8px; background:transparent; border-bottom:4px solid pink; color:OrangeRed; } </style> </head> <body> <div class="menu"> <ul class="ty-menu__items"> <li class="ty-menu__item"> <a href="#home">Lore</a> </li> <li class="ty-menu__item"> <a href="#news">Lore</a> </li> <li class="ty-menu__item"> <a href="#contact">Lorem i</a> </li> <li class="ty-menu__item"> <a href="#about">Lorem</a> </li> </ul> </div> </body> </html>