DivitoDesign

Everything for the Web Professional

How-to: DropDown CSS Menu

Information about the Author:

Name:

URL: http://twitter.com/divitodesign

Description enjoy design, write articles, like typography, love football, keep chilling.

More on: CSS

206 Comments

  1. Great tutorial. I have been using DHTML on one of sites for a while now and it was a pain to implement. I just tried your tip and it was a breeze. thanks

  2. Thanks for the help, im going to update my website. It will be used on my Home Lighting website.

    ~Jeff

  3. Tom says:

    Thanks a lot for the tutorial, it’s bookmarked for future use when a non javascript solution is needed.

  4. bobl says:

    Thanks for posting this… really helped

  5. Thanks a million for this article, been looking for a solution to a problem i had with a drop and seems i have found it here! Keep up the good work !

  6. As i commented on the other drop down article, thanks alot this has helped me solve a few problems ive been having!

  7. gwan says:

    Good tutorial, a great and simple way to get a crossbrowser drop down menu working.
    I am not so good at javascript, i had someone else do a drop down menu for me for a joomla site. Sadly it does not work in IE6 and that person has disappeared. :-(
    I was searching for a crossbrowser menu and landed on your page.
    There are certain issues with my menu that is why I cannot use your menu as it does not address those issues. So I wanted to know if this was possible in your menu.

    The top level has nine menus of different lengths for e.g.
    Home About-Us Milestones Customer-experience Community-Initiatives Community-Health-Care Careers Contact Us
    I have only a fixed width for the page that is 988px.
    The biggest problem I face is that if I make the li a fixed size then the menu will overflow outside the page(or drop down to the next line).
    I cannot use 100% width with padding as that will make the smaller menu small and that will make the menu smaller than the width of the age leaving a lot of space to right. The design looks good when the menu is evenly spread out.

    So how can I achieve this in your menu(that work is IE6 too).
    I had played around a lot with the css and finally managed to get it right in firefox and IE7, by giving the dropdown width 100% in firefox and adding a conditional comment for IE with width of the drop down list to auto.
    This make the entire drop down width as large are the large menu item(there are large and smaller item in the sub menu too).
    I hope I havent confused you.
    Any idea how this can be achieved. Thank you

  8. [...] creative enough to think of how to do it or something. css drop down menu – Google Search -> How-to: DropDown CSS Menu DivitoDesign It’s pretty easy. __________________ proxy sites | proxy | web proxy | glype proxy GAIA FLP [...]

  9. Jennifer says:

    just wondering how to make a sub menu from the submenu. for example, can you create another menu off the Webdesign dropdown?

    like Services
    Webdesign
    Basic
    Pro

    Basic and Pro being the sub sub categories that would be linked to something?
    thanks!

  10. Thomas says:

    Great blog, thank you! This tutorial made my blogsite so much more accessible to my fellow bloggers.

    Another thing i love and found extremely accessible are the used cars in riverside county.

  11. Web Forums says:

    Thanks, this was very useful for me

  12. mingming says:

    Thanks for the post , it helps me alot

  13. This is a great example for dropdowns.

    I am building a website that will rebuild the sites menu each time the page is loaded from a database. This example is very helpful towards that. Thank you for the example. The vertical menu is kick butt too!

  14. Thanks for the useful information. It helps alot to fix my errors in the css sheet..

  15. Hi Stefan,

    You are rocking on CSS.
    I was under impression than drop down is not possible without JavaScript but you made it by just CSS. Also Special Thanks for you explanation about how it is working.

    Thanks a Lot!!

  16. Thanks a lot for the useful information, i learned quite a lot about css

  17. Mr Stefan

    That was a Awesome tutorial! very detail and useful for me. But it cannot show up in my Opera browser… maybe i forgot to end the line…. but thanks anyway!!!

  18. Web Design says:

    This article helped me a lot with a project I’m working on. The menu isn’t exactly what I was looking for. I wanted something vertical. Anyway I managed to change it but then I noticed it wasn’t working in IE 8. I was like wtf??? Then I realized the original menu has the same issued with IE 8 :( Damn Microsoft. They always know how to break compatibility. Anyway I think I’ll just leave the website like that for now. Nobody uses IE 8 anyway :P

  19. i3l1nd3d says:

    Awesome, Ill have to try this… I did not know it was possible to have a drop-down menu without javascript.

    David Leonard – Tampa Freelance Web Design

  20. thanks for this gonna try it now will report back if i get any problems

  21. New Cars says:

    Great thanks for the information, much appreciated

  22. James says:

    Thanks for the tutorial. I have always had difficulty dealing with css. Your explanation is very clear and simple. Simple question, does this work on every browser as i read someone saying it did not on Opera…

  23. Mobbing says:

    very clean & nice = thx a lot

  24. thank you very much for the tutorial. i’ve been looking for something like this for a few days and was delighted to come across your instructions. for some reason, after using your code (with no modifications) the menu looks very stripped down (drop down floats over body text), no boxes around menu items, main menu isn’t centered. I’m just learning CSS and i’m wondering if you can help with some code to get the menu looking a bit better. any help you can provide would be appreciated.
    thank you!

  25. very good, thank you very much!

  26. i was looking for this for a few days.it works like a charm. thank you!

  27. Hey ,
    i like the way you have the “html” and “css” snippets . very cool :)

  28. Thanks for the tips man, worked beautifully. As the person above me said your code blocks are absolutely beautiful. How did you do that?

  29. This is really a nice tutorial for creating css menus. There are quite a few tools for eg ProjectSeven now available which automated this task.

  30. Andrew says:

    I guess CSS isn’t as confusing as it sometime seems. Thanks!!

  31. hider says:

    Thanks for the useful post, i’ll try it on one of my sites

  32. cuocthiseo says:

    Very nice, I follow these steps and got a good looking blog now.
    Thank you very much.

  33. Chris says:

    Thanks a million I have been trying for weeks to get the same effect but had not luck. Worked like a charm.
    Thanks

  34. Recipes says:

    Thanks! I like the way you make it easy to understand!

  35. Thanks, im just starting to learn css and this was great.

  36. this is a useful post, i’ll try it on my sites thank you

  37. Thanks for the useful post, i’ll try it on one of my sites

  38. I was looking for this, and unlike other methods, this works !

    Great post dude.. keep sharing!

    cheers :)

  39. Mark says:

    Very, very useful information. Take a look at http://www.knrdesigns.com and I used one of your techniques.

    Thanks a lot!
    http://www.knrdesigns.com

  40. Dan says:

    I just used for a drop down menu on my site http://teenjobscene.com

Please Respond and Give your Opinion

We use Gravatar to handle our avatars. Get one there!