html - Stylizing Horizontal Navigation Bar -
i'm creating horizontal navigation bar , stylize thin line appear right above bar (please see example).
as can see there thin, gold line above red navigation bar. thin, black line above orange navigation bar.

my code looks this: (css)
nav {width:100%;display:block;} nav ul {list-style-type:none;margin:0;padding:0;text-align:center;background-color:#c0872e} nav li {display:inline-block;background-color:#c0872e;} nav {line-height:35px; color:white; padding:0 30px; font-size:22px; font-family:windsordemi.fog cn; background-color:#c0872e;} nav a:hover {text-decoration:none} (html)
<div> <ul> <li><a href="index.html">home</a></li> <li><a href="products.html">products</a></li> </ul> </div> please let me know how can achieve desired effect. thank you!
you accomplish using border:
nav ul { border-top: 2px solid #000; /* added */ list-style-type:none; margin:0; padding:0; text-align:center; background-color:#c0872e } here's jsfiddle show how looks.
hope helps! let me know if have questions.
Comments
Post a Comment