Make all navigation links look the same - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Nav Bar

Description

Make all navigation links look the same

Demo Code

ResultView the demo in separate window

<html lang="en">
 <head> 
  <title>Lorem ipsum dolor si</title> 
  <style>
nav a {<!--   w ww  .  ja v a  2 s.c  om-->
   background-color:Chartreuse;
   border-radius:16px;
   color:yellow;
   display:block;
   font-size:2.26em;
   padding-bottom:0.445em;
   padding-top:0.445em;
   align:center;
   text-decoration:none;
   max-width:19.890em;
   height:41px;
}

nav ul li {
   text-align:center;
   padding-bottom:12px;
}

ul {
   list-style-type:none;
   margin:0;
   padding-bottom:0;
}

@media screen and (min-width: 484px){
   nav ul {
   display:flex;
   justify-content:center;
   margin:0 -0.26em;
}

nav ul li {
   flex-grow:2;
   margin:0 0.26em;
   padding-left:0.334em;
   padding-right:0.334em;
}
</style> 
 </head> 
 <body translate="no"> 
  <nav id="navigation"> 
   <ul> 
    <li> <a id="nav-intro" href="#introduction">Lorem ipsum </a> </li> 
    <li> <a id="nav-cont" href="#content">Lorem ip</a> </li> 
    <li> <a id="nav-loc" href="locations">Lorem ipsum dolo</a> </li> 
    <li> <a id="nav-care" href="care">Lorem ipsum</a> </li> 
   </ul> 
  </nav>  
 </body>
</html>

Related Tutorials