Build Multi-level Multi-column Multi Menus with pure CSS

Tags: ,
Advertisement

I am sure there are many designers and developers who likes to implement the Multi-level, Multi-Column, Multi-Menus, Light Weight and the most Browser Compatible Menu or Navigation with pure css and without using any javascript.

What is this Multi-Menus? :)
Don’t worry its not a new term – you can implement Multiple Menus by using the same CSS by just having different class names for changing the colors and the height of the other menus.

I am one among them, who searched a lot to get the proper and pure css multi-level, multi-column and multiple menus – but failed to get the proper menu and thought why not explore a little with my little css knowledge I have. So started exploring the best way to implement menu with only CSS. And here is the result of it, this menu works well in all the latest browsers.

Multi-level Multi-column Multi Menus with pure css

Multi-level Multi-column Multi Menus with pure css


Tested and works perfectly in the following latest browsers – Firefox, Google Chrome, Safari, Opera, Internet Explorer and among the most, it works excellent with IE 6 :) . Few call it is with IE 6 Hack, but its not – this method is by using Conditional Comments.

The best features of this menu is:

  • Pure CSS (Only CSS)
  • Multi-Level
  • Multi-Column
  • Multiple Menus in Single Page :)
  • HTML List based
  • Supports all the latest browsers
  • Supports IE6 with Conditional Comments
  • Browser Compatible
  • Light Weight
  • and the most is Flexibility – Can be work for 3 or more level – just need small tweaks in CSS :)

Let me Explain how I made it compatible to IE 6, but I am not gonna paste the whole CSS code over here, as some are scared to see the huge code, its not a huge code though, just see the result folks :) and don’t forget to spread it if you like it, because this will be helpful for many of your friends out there.

If you check the View Source of the Demo, you observe some comments like:
<!–[if lte IE 6]> and ending with <![endif]–>

Some call it as a IE 6 Hack, its by using the Conditional Comments, you can get a complete over view of the Conditional Comments at MSDN – Internet Explorer Developer Center

And the Conditional Comment types I have used in this example are Downlevel-Hidden
<!–[if lte IE 6]><![endif]–>

and Downlevel-Revealed
<![if gt IE 6]><![endif]>

You might be thinking what is this lte and gt?
Those are Operators which can be used to create conditional expressions. You can check the available Operators at MSDN – Internet Explorer Developer Center, observe the table which describes the list of operators that can be used to create conditional expressions. Check the examples in the same page for getting an idea of the same.

The Operators I have used are:
lte = The less-than or equal operator. Returns true if the first argument is less than or equal to the second argument.
gt = The greater-than operator. Returns true if the first argument is greater than the second argument.

That’s it Check the Demo, Download and Explore yourself :)

demodownload

And now this gonna be a part of our WittySparks CSS Framework

Kindly share your ideas to improve it more….

Before people use to say Digg It – now its fashion to say Tweet It :) – But I say Spread iT and show some love :)

Sponsors

If you enjoyed this post, please feel free to bookmark it using your favorite social bookmarking site!

This article was written by sravkum - who wrote 189 stories on this site so far.

A Creative Web Designer, Developer and User Interface Expert.

28 Comments on “Build Multi-level Multi-column Multi Menus with pure CSS”

  • Alex Flueras wrote on 22 September, 2009, 9:39

    Thank you so much! I was looking for something like this since I first saw a “Mega Menu” article in SitePoint Magazine.

  • favSHARE wrote on 22 September, 2009, 16:09

    This article has been shared on favSHARE.net. Go and vote it!

  • Lam Nguyen wrote on 22 September, 2009, 22:05

    That’s a good example. I would like to suggest an elegant menu that I made few days ago. Elegant Drop Menu with CSS only

  • Thurein wrote on 6 October, 2009, 9:53

    great tutorial. thanks

  • Erica wrote on 6 November, 2009, 14:54

    Hey, that’s a great menu, thanks.
    i’m only new to CSS and just downloaded, and wondering is there any chance this can be made pop up?

  • Guadalupe wrote on 26 November, 2009, 4:56

    no puedo bajarlo.. :(

  • Graphic, Web, Blog Design | BrandleDesign wrote on 3 December, 2009, 23:34

    Thanks for the advice. Great tutorial.

  • tom wrote on 27 January, 2010, 19:54

    Any chance of developing this for Joomla?

  • xRommelx wrote on 25 February, 2010, 18:31

    thank you mae, in this momento this is very useful for me :)

  • Bobin wrote on 12 April, 2010, 13:32

    wow! man you rock,

  • harry wrote on 22 April, 2010, 22:02

    Well done this will come in handy for a few future projects

  • netbaazigar wrote on 19 May, 2010, 23:28

    Loved the post.
    I am taking the liberty of adding a reference to your article on my CSS aggregator site. Do let me know if you are ok with this.

  • admin wrote on 19 May, 2010, 23:48

    @netbaazigar – Thanks and sure please go-ahead and add it to your CSS aggregator.

  • web Creations wrote on 6 June, 2010, 9:13

    Great Job!!
    I have one problem. It sucks when I use it for right side menu. It flows out of the visible area.

    Is there any solution for this?

  • admin wrote on 7 June, 2010, 23:44

    @WebCreations – would be great if you can share the link where you are trying to implement this – would try our best to solve this…..

Trackbacks

  1. designfloat.com
  2. devmarks.com
  3. zabox.net
  4. Graphic Design Links and Tutorials
  5. pligg.com
  6. Build your own Firefox like Multi Search Box for your site - WittySparks
  7. 50+ Fresh CSS Techniques, Tutorials and Resources | Graphic Design Pro
  8. 50+ Fresh CSS Techniques, Tutorials and Resources | Theme Center
  9. 50+ Fresh CSS Techniques, Tutorials and Resources | Gacik Design Blog
  10. 50+ Fresh CSS Techniques, Tutorials and Resources | Design-Tut+
  11. 25+ Tutoriais CSS e jQuery, Recursos e Técnicas
  12. 50+ Fresh CSS Techniques, Tutorials and Resources « Oviyas Blog
  13. A Trend of Multi Column Mega Drop-down Menus with 30 examples! - WittySparks

Write a Comment

Powered by WP Hashcash