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 Mark’s Blue Blocks Menu

Date: 11/11/2004 Mark’s Blue Blocks Menu

Author: Mark Newhouse- Taming Lists

A very attractive "blocks" CSS menu with hover effect. In IE Win, the links (<a>) are set to a width of 100%, while in other browsers, it's set to auto, using child selectors (html>body #button li a). This conditional CSS is possible since IE Win (6 and below) doesn't support child selectors while other modern browsers do, and is necessary, since a definition of 100% trips up Mac versions of IE5 and Mozilla.

The CSS:

#button {
width: 150px;
border-right: 1px solid #000;
padding: 0 0 1em 0;
margin-bottom: 1em;
font-family: 'Trebuchet MS', 'Lucida Grande', Arial, sans-serif;
font-size: 90%;
background-color: #90bade;
color: #333;
}

#button ul {
list-style: none;
margin: 0;
padding: 0;
border: none;
}

#button li {
border-bottom: 1px solid #90bade;
margin: 0;
}

#button li a {
display: block;
padding: 5px 5px 5px 0.5em;
border-left: 10px solid #1958b7;
border-right: 10px solid #508fc4;
background-color: #2175bc;
color: #fff;
text-decoration: none;
width: 100%;
}

html>body #button li a {
width: auto;
}

#button li a:hover {
border-left: 10px solid #1c64d1;
border-right: 10px solid #5ba3e0;
background-color: #2586d7;
color: #fff;
}

The HTML

<div id="button">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">Toys and Games</a></li>
<li><a href="#">Computers</a></li>
<li><a href="#">Electronics</a></li>
<li><a href="#">Furniture</a></li>
<li><a href="#">Outdoors</a></li>
<li><a href="#">Home Appliances</a></li>
</ul>
</div>

Comments (33)

How can i add a submenu on this css menu.. Looks good but i need to add submenus

#1: Ismael on 11/16 at 04:37 PM

Here you have ( on cssdrive exaples ) 2 level css menu, just apply this menu style ....

Nice looking menu btw !

#2: nemanja on 11/25 at 06:24 PM

I have been working on a similar menu for a couple of days now and hit a brick wall. Thanks for the very slick menu, and a great way of pulling off the achieved goal I was looking for, in a very slick and compact code base.

Again, many thanks for the hints. :)

#3: Webgeek on 01/03 at 06:19 AM

this menu was written by someone else... the author is taking credit for someone elses work... git...

#4: S on 01/30 at 02:23 PM

Very good!! very good indeed.., great job

#5: majuranus on 02/20 at 03:41 AM

Is it possible to make this menu horizontal?

It's great.

#6: richard bloom on 03/03 at 11:43 AM

You menu is great and beauttful

#7: Amir Sherif on 03/25 at 02:20 AM

clean code, fast & great menu with excellent look & feel.
Thanks Mark.

#8: aadhunik on 06/11 at 02:21 AM

I love this menu - I am using a variation of it at a sute I am building for a friend of mine... http://www.youkitchens.com/

-Jim

#9: TenTonJim on 07/27 at 11:13 PM

Looking for more enhancements.

#10: Mag on 08/03 at 04:15 AM

Post a Comment: Guest (Login or Register)

Name: (Required)

Email: (Required)

(NOT shown on page)

URL:

(Shown on page if entered)

Comments: (Required)

Remember my personal information
Notify me of follow-up comments?

Submit the word you see below:


CSS Forums

CSS Forums: latest threads Last Post Info
Cant design (1) 05/16/2008 12:28 pm
By: tarik
How to show an entire pdf in one div (2) 05/14/2008 11:07 am
By: Grundic
Starting A Web Design Business - How Do I Attract Customers? (10) 05/13/2008 02:37 pm
By: april
Download.. Pacific Wings multicolor menu (1) 05/13/2008 03:05 am
By: sebreh
Check out this website I am working on CRITIQUE. (5) 05/13/2008 01:20 am
By: abran