skip to content
Website Builder

A CSS only dropdown menu with 'current page' override

2nd November 2009

©2009 stu nicholls - CSS play

CSS play Support


CSS play Recommend

Free, practical CSS menus, layouts, and examplesSitegrinderPSD to HTMLuk white label shopping carts for resellers



Information

Following on from my vertical slide menu with 'current page' override, this is a dropdown menu with the same options. I am not sure how useful this is but have produced this demo to show how it can be done.

The menu has a 'current page' option where on page entry the current top level and sub menu page are visible and hightlighted. In this demo the current top level is 'Services' and the current page is 'Printing', and this is visible when the page is first loaded.

The current top level and sub menu have an off-white background color.

Hover over any other top level list item will cause the current page dropdown to vanish and the menu will act as though there is no 'current page' option. Hover over the items under the 'Services' will give the menu a white background and the current sub menu option will revert to a non-selected color.

Moving the mouse off the menu will cause the current selection to appear again.

Tested in IE6, IE7, IE8, Firefox, Safari(PC), Opera and Google Chrome.




Copyright

Because of all the time and effort spent in producing this demonstration I would ask that you respect my copyright.

1. If you are using this on a personal web site then please retain the copyright comment in the stylesheet.
A donation to the 'Support CSSplay' fund is now required for this demonstration.

2. If you are using this on a commercial web site, or as a paying job for a client, then please email me asking for permission - stu{at}cssplay.co.uk and again a donation to the 'Support CSSplay' fund is required.

3. If you are having problems integrating any of my demonstrations into your website then I now offer a service to fault find and correct any errors that you may have introduced. Please email me for more information.

Terms and Conditions

This menu can be used subject to the following terms and conditions.

  1. If you wish to use this menu in your website(s) please email me stu{at}cssplay.co.uk seeking permission.
  2. You may NOT place this menu on another site for others to download.
  3. You may NOT redistrubute or resell this menu.
  4. Users agree not to remove or edit the credit notice within the stylesheet, or claim that this menu is their own.


CSS play Recommend

CSS play Testimonial

"The citroen.co.uk web site uses
CSS play code for the site drop down menus.
This code works seamlessly in IE 6 & 7, and is an excellent solution to the Creative requirements of the site."

Damon Clark - Brandwidth