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.

Fantastic code. Exactly what I needed.
I had one problem with IE 8 – the [ #nav .current a, #menu li:hover > a ] inherits down to the li tags and causes a bad display.
Adding “filter:;” to [ #menu ul li:hover a, #menu li:hover li a ] fixes it.
#menu ul li:hover a, #menu li:hover li a {
Great explanation! Not a lot of words, but the image of the CSS code is very ilustrative –> “an image said a thousand words” and the horizontal menu is awesome. So, Thanks!
I always find this website as best, when ever I faced designing regarding issues.
Thanks again.
Its just amazing .. Very useful website for every designer
Thank you for that very interesting.
this site very nice tnx tnx
Can you help me find this file img/gradient.png.
Then finally I can try to make this menu work for my new website.
tnx for this post .very nice
tnx very goooooooood
thanks nick for this tut.i’ll bookmark this article for my next project .yesterday i implemented another css3 menu based on this tutorial here :
http://youhack.me/2011/09/18/how-to-build-a-drop-down-menu-enhanced-with-css3/
P.S. Where’s your RSS subscription link ?
I love the look and functionality of this menu. Very well done! However, I’m having problems with the level 2 dropdown displaying in IE 8. I’ve read all comments on this thread and see that others are having the same problem. Has anyone found a solution?
I’ve tried playing around with z-indexes, and have even replaced some html 5 elements with divs but no success.
I would appreciate any help you might be able to provide! Thank you!
Thanks you sooooo mush….you are to good. :)
İ want to use this menu. How can i take th code and gif pictures?
hi thx… i am here http://www.webdesignerwall.com/demo/css3-dropdown-menu/img/gradient.png
Really nice example, thanks for the use! One question, when I click on say ‘Contact’ how do I make the ’rounded-selection-button’ park on this page and not stay on the ‘Home’ selection?
(I’m sure I’ll wake up in the morning and figure it out eventually…)
…never mind, got it ;)
read the code, its all in front of you!
Thanks for making this tutorial very detailed. Great!
Hey, how I fix it on IE 6,7,8,9 don’t know what versions are with bugs
Realmente uma otima maneira, quem sabe uma das melhores para a construção de menus interativos, fiz alguns modelos ultilizando JS para transferir as classes pois tambem encontrei erros com :HOVER como ja foi dito.
Awesome! Keep up the good work!
Does anyone know how I can change the .current class dynamically that it fit’s to >>current<< the page?
just got it.
I used id’s for the tags which could be in a current state. And for the same tag I used to get an unique combination of id and class: “#li_id_xyz.page-id-xx” which I could use in my stylesheet. :)