Two columns Three columns Mixed cols and rows Gallery Archives Clean & Clear Dark or Black High Contrast/ Impact Blog Designs New Corporate/ Professional Unconventional Designs Liquid layouts Web Design Firms Our Favorites What's Popular Last 20 submissions
Horizontal Menus Vertical Menus Multiple/ Nested Levels

CSS Examples Dashed Vertical Menu

Date: 05/14/2005 Dashed Vertical Menu

Author:

A simple yet elegant list based vertical menu. Move the mouse over a link, and the link area changes color. A thin dashed border follows each menu item.

The CSS:

<style type="text/css">

#vertmenu {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 100%;
width: 160px;
padding: 0px;
margin: 0px;
}

#vertmenu h1 {
display: block;
background-color:#FF9900;
font-size: 90%;
padding: 3px 0 5px 3px;
border: 1px solid #000000;
color: #333333;
margin: 0px;
width:159px;
}

#vertmenu ul {
list-style: none;
margin: 0px;
padding: 0px;
border: none;
}
#vertmenu ul li {
margin: 0px;
padding: 0px;
}
#vertmenu ul li a {
font-size: 80%;
display: block;
border-bottom: 1px dashed #C39C4E;
padding: 5px 0px 2px 4px;
text-decoration: none;
color: #666666;
width:160px;
}

#vertmenu ul li a:hover, #vertmenu ul li a:focus {
color: #000000;
background-color: #eeeeee;
}

</style>

The HTML:

<div id="vertmenu">
<h1>Navigation</h1>
<ul>
<li><a href="#" tabindex="1">Home</a></li>
<li><a href="#" tabindex="2">About Us</a></li>
<li><a href="#" tabindex="3">Computing</a></li>
<li><a href="#" tabindex="4">Web Sites</a></li>
<li><a href="#" tabindex="5">Games</a></li>
<li><a href="#" tabindex="6">Links</a></li>
</ul>
</div>

Comments (42)

Little too simple! Also foudn a bug in Older version of firefox.

#1: Dean on 09/16 at 04:46 PM

Love It! Thank You!!!!!!!!!!!!!!!

#2: Piper Lynn on 10/18 at 11:26 AM

what a great tut. Simple, easy to read, easy to implement. I appreciate it and I'm going to use some of it on my own pages. Thank You.

#3: Bill on 11/29 at 12:15 PM

cool but its kids stuffs

#4: mindlesswsizard on 12/11 at 12:14 AM

Yeah I really like how easy this is to understand. I work occasionally on this gamer site and changing templates is a lot easier with tutorials such as yours, thanks

#5: Nick on 02/13 at 04:18 PM

Hi,
Firstly, great script.
The script was displayed on page as expected. However, I don't know why, everytime I make changes eg on the font color, font size,background color etc, the changes are not reflected. The only thing I managed to do was to bold the font.any advice? tQ

#6: iGGy on 02/20 at 03:41 AM

Hi again..forget the question before this. Found the problem. My mistake. Didn't realise my other css file superceded this css. Removing the other css file solved the problem. Still..thanks for the great script!. :P

#7: iGGy on 02/20 at 04:20 AM

is there any submenu example?

#8: sahibinden on 04/30 at 04:39 PM

Looks good! I like the dashed border.

#9: AdSense VS Chitika on 05/14 at 09:58 PM

Hi, can i impliment this code in '<td>'? or it will work in only div tags?

#10: Aravind on 06/17 at 04:37 AM

CSS Forums

CSS Forums: latest threads Last Post Info
Looking for CSS freelancers to outsource work to (26) 12/03/2008 06:16 am
By: iohnee
Shared SSL Certificate by hosting company - is that fine? (2) 12/02/2008 11:53 pm
By: OswaldJim
spacing with the UL tag (1) 12/01/2008 11:11 am
By: mortendc
My Website (5) 12/01/2008 08:15 am
By: austenjones
CSS code coloring (4) 11/29/2008 11:32 pm
By: kamal