/ Published in: CSS
useful and simple css navigation menu bar.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<style> .horizontal-nav { width:100%; height:30px; padding: 0px; margin-bottom: 10px; } .horizontal-nav ul { margin: 0px; padding: 0px; float: left; text-align: center; border-radius: 6px; border: 1px solid #727272; background-image: -moz-linear-gradient(center bottom , #404040 0%, #5F5F5F 100%); } .horizontal-nav ul li { display: table-cell; float: left; margin: 0px; padding: 0px; border-left: 1px solid #727272; } .horizontal-nav ul li:first-child { border-left: 0 none; } .horizontal-nav ul li a { display: block; padding: 5px 30px; color: #fff; font: bold 12px Arial,Tahoma,Helvetica,sans-serif; text-decoration: none; border-top: 1px solid rgba(255,255,255, 0.25); border-left: 1px solid rgba(255,255,255, 0.25); } .horizontal-nav ul li:first-child a { border-left: 0 none; } .horizontal-nav ul li a:hover { background: #282828; } .horizontal-nav-a-selected { background: #282828; } .horizontal-nav ul li:first-child a { border-top-left-radius: 6px; border-bottom-left-radius: 6px; } .horizontal-nav ul li:last-child a { border-top-right-radius: 6px; border-bottom-right-radius: 6px; } </style> <div class="horizontal-nav"> <ul> <li><a href="#">Menu 1</a></li> <li><a class="horizontal-nav-a-selected" href="#">Menu 2</a></li> <li><a href="#">Menu 3</a></li> <li><a href="#">Menu 4</a></li> <li><a href="#">Menu 5</a></li> </ul> </div>
URL: http://function-code.blogspot.com/2014/11/css-navigation-bar.html