--- comments: false date: 2011-02-17 09:47:44 layout: post slug: creating-a-pure-css-dropdown-menu title: Creating a pure CSS dropdown menu wordpress_id: 2547_ categories: - Web Development tag: - CSS - CSS3 - HTML --- In redeveloping the Venturelab site we became increasingly aware that there was a lot of content that needed navigating extremely simply and fairly rapidly. We have so much to say and such a lot of content that the navigation of the site needed to be even more dynamic and encompassing than normal. ## [Demo](/demos/css-dropdown/) This article has been ported from the now-defunct Venturelab Devblog, where I had originally authored it. {% include promo.html %} Each page features a sub-navigation area, which links to all the other pages within that section of the website. This is great, and works perfectly, but in order to get to, say, [the FAQs](http://www.venturelab.co.uk/faq) page from the home page, you'd first have to go to [the about page](http://www.venturelab.co.uk/), then on to the FAQs from there. This is by no means unacceptable, but we like to go that extra step at Venturelab… I was looking at the main menu of the site when inspiration struck. Something as common and simple as a series of dropdown menus under each meta menu item would improve the navigability and usability of the site massively. Also, they are incredibly simple to create, and here's where I teach you how… ## The concept What a dropdown menu provides is a hierarchical overview of the subsections contained within the menu item that spawned it. Basically, it lists all the subsections within a section of a site when you hover your mouse cursor over it. {% include promo-case-studies.html %} They are extremely useful in showing what a section of a site contains, and allowing you to access it from anyway else in that site, whether that be the parent page of that subsection, or a page in a different section altogether. ## The markup A lot of dropdown menus rely on bulky, extraneous markup and Javascript to work, ours will use only the cleanest HTML and some lean CSS, with some lovely progressive CSS3 for good measure. ```html
``` As you can see here the markup is simply a series of nested `