CSS Horizontal Menu

m5 design studio logo

Create a simple HTML bullet list menu and style it with CSS:

Demo:

HTML Code

<div id="primary_menu" >
<ul>
<li><a href="#" >menu item 1</a></li>
<li><a href="#">menu item 2</a></li>
<li><a href="#" >menu item 3</a></li>
<li><a href="#" >menu item 4</a></li>
<li><a href="#" >menu item 5</a></li>
</ul>
</div>

CSS Code



#primary_menu ul{
  margin: 0;
  padding: 0;
  list-style-type: none;

}



#primary_menu li{
  display: inline;
  margin: 0;
  color:#FFFFFF;
  font-weight: bold;
  font-size:14px;
  font-family:Verdana;

  }

 

#primary_menu li a{
  float: left;
  display: block;
  text-decoration: none;
  margin: 0;
  padding: 8px; /*padding inside each tab*/
  border-right: 1px solid white; /* line divider between tabs*/
  color: white;
  background: #414141; /*background of tabs */
}



#primary_menu li a:visited{
  color: white;
}


#primary_menu li a:hover{
  background: black; /*background of tabs for hover state*/
}



#primary_menu li a:active{
  color: white;
  }

Category: CSS Tags: , No Comments

Author

M5 Design Studio

We are a small, but creative and passionate team of designers and developers specializing in web design, graphic design, branding & digital marketing.


m5 design studio logo

Simple CSS Gallery: Image & Text Rollover

Create a simple CSS gallery with thumbnails, large images and text. Demo IMAGE ONE:Lorem ipsum dolor sit ame
m5 design studio logo

CSS Text and Image Menu Rollover

Create an HTML menu with images and text styled with CSS: Demo onetwothree HTML Code <div id="menu_conta
m5 design studio logo

CSS Menu Current Page Highlighted

Create a CSS menu that indicates or highlights the current page: Demo Home About us Contact us HTML Code &


Comments are closed.