While I was coding the Notepad theme, I've learned some new CSS3 features and now I would like to share it with you. View the demo to see a Mac-like multi-level dropdown menu that I've created using border-radius, box-shadow, and text-shadow. It renders perfect on Firefox, Safari and Chrome. The dropdown also works on non-CSS3 compitable browsers such as IE7+, but the rounded corners and shadow will not be rendered.
Preview
The image below shows how the menu will look if CSS3 is not supported.

One Gradient Image is Used
A white-transparent image is used to achieve the gradient effect. Because the new CSS3 gradient feature is not supported by all browsers yet, it is safer to use a gradient background image.

The instensitiy of the gradient can be changed by shifting the background image up or down. Also, the gradient color can be easily adjusted by changing the background color.

CSS Code
I'm not going to explain the CSS line by line. The images below explain the key points on how this dropdown is coded.


Update Apr 13 2010: Pure CSS Dropdown (No Image Used)
The following demo used CSS gradient and IE gradient filter instead of the gradient image. It works for Webkit browsers, Firefox 3.6+, and IE.

thank you so much for this l
thank you
Web Designing Company in Delhi | Website Designing Company in Delhi India | Web Development Company | SEO Services in Delhi | Professional Web Designing with Promotion | Software Development Company
On hover needs rounded corner in first and last child ;-)
Hi Woohoo,
try this i think it help u.
.yourClass.first-child a:hover,.yourClass.last-child a:hover
{border-radius:5px}
I’ve added your code to my site; here’s a copy of my CSS – http://pastebin.com/Dn38bB0Y
On the site, when I hover over the LI that is supposed to “drop” it puts the dropdown list in the top left corner – if I change the positioning from ABSOLUTE to REALTIVE it puts the menu in the “right” location, but it acts as if there is a space for it, stretching the menu and moving the last top-level item to a second row.
Please e-mail me if my description is not helpful enough so I can provide a link to the dev. site.
Thanks for the tutorial. Although I’m half blind from trying to read the code in the .gif image it looks great on my site.
Please consider posting code instead of posting images of code, there is absolutely no benefit to using an image.
Wow ! Great Man ! Thanks :)
This is great!.
I am trying to use this in a vertical menu system, but the sub menu appears behind the top menu links. Can you advise how to change this?
Each top menu is in its own because of my layout restrictions
Thanks in advance.
thanks really nice work….
like this side
Great! Thanks, this is very flexibile and simply menu!
rerre
Totally superb and tremendous styles of drop down menus with css effects. Great post.
I have a problem with IE . border-radius doesn’t work :(
IE doesn’t support css3 elements my bro
Hi there a very nice tutorial. Keep it up dude
if it is free then why you are not provide gradiant.png
Really nice article!
Nice tutorial for a dropdown menu.
Thank’s Bro ,.. very usefull for me :D
Tank you very much.