skip to content
Website Builder

The NEW variable width single level dropdown menu system

21st July 2010

A dropdown menu that can accommodate variable width text in the top level and submenu without javascript, conditional comments, hacks, htc files and tables, just html and css.
Tested in IE6, 7 & 8, Firefox, Opera, Safari, Chrome, SeaMonkey, Flock, Avant and Maxthon.
Tabbing is available in all browsers that support this feature.

copyright ©2010 - stu nicholls - css play


CSS play Support


CSS play Recommend

PSD to HTMLSitegrinderuk white label shopping carts for resellersFree, practical CSS menus, layouts, and examples

Follow CSS play

Facebook   Twitter



Information

No javascript, no conditional comments, no hacks, no tables, no expressions, just CSS and XHTML

Just when you think that you have seen it all along comes another method of producing a dropdown menu. This one is based on an original idea and preliminary work by Timo Huovinen http://thinkhtml.blogspot.com/ and discussed on the Sitepoint Forum.

With permission, I have used the method, and with a little re-coding and re-styling have managed to get it to work in all the major browser, and a few minor ones.

This method uses no hacks, no javascript, no conditional comments, no htc files, no tables etc etc, just html and css. It allows you to have links of any length in both the top level and sub menu links (which was a problem with the float/drop menu system where the widths had to be fixed). It also allows you to tab through the menu in IE and Firefox.

Tested in IE6, IE7, IE7 emulation, IE8, Firefox, Opera, Safari, Chrome, Avant, SeaMonkey, Flock and Maxthon. It should also work in Mac browsers.

Now to see if we can make it a multi level menu...




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 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