CSS and HTML Navigation Bar with narrow column - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Nav Bar

Description

CSS and HTML Navigation Bar with narrow column

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <style>
body<!--   w w w  .java 2  s . com-->
 {
   background-color:Chartreuse;
}

.font_title
 {
   font-family:"Segoe UI";
   font-weight:bold;
   font-size:61px;
   text-align:center;
}

#title
 {
   width:801px;
}

#container
 {
   position:relative;
   margin:auto;
   width:801px;
   height:996px;
   background-color:yellow;
}

#navigation_holder
 {
   position:relative;
   margin:auto;
   width:801px;
}

.navigation_button
 {
   font-family:"Segoe UI";
   text-align:center;
   font-size:27px;
   width:201px;
   height:41px;
   background-color:blue;
}

.navigation_button:hover
 {
   background-color:pink;
}

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

li
 {
   float:left;
}

a:link,a:visited
 {
   display:block;
   width:201px;
   font-family:"Segoe UI";
   text-align:center;
   font-size:27px;
   width:201px;
   height:41px;
   background-color:OrangeRed;
}

a:hover,a:active
 {
   background-color:grey;
}
</style> 
 </head> 
 <body> 
  <div id="container"> 
   <!-- The main container --> 
   <div class="font_title" , id="title">
     Lorem ipsu 
   </div> 
   <div id="navigation_holder"> 
    <ul> 
     <li id="navigation_button_1"> <a href="#">Lorem </a> </li> 
     <li id="navigation_button_2"> <a href="#">Lorem i</a> </li> 
     <li id="navigation_button_3"> <a href="#">Lorem ipsu</a> </li> 
     <li id="navigation_button_4"> <a href="#">Lorem ips</a> </li> 
    </ul> 
   </div> 
   <!-- More DIVs in the container --> 
  </div>  
 </body>
</html>

Related Tutorials