Drop-down dilemma
January 2nd, 2004 by Liss
Drop-down menus for navigation are a huge problem for many developers, especially those who want to create pages that are clean, easy to maintain and consist of valid XHTML markup using CSS for design elements rather than a mess of nested tables and invalid, inaccessible Javascript code.
Unfortunately, designers (and clients) adore them. They are, admittedly, an easy way to get lots of options in front of the user quickly (let’s not discuss whether or not that’s a good thing right now), so developers are often forced to find a way to work with them whether they like it or not.
For a site I did recently, I collaborated with the other developers at work and came up with what I think is a pretty elegant solution to the problem. Originally based on menus done by another firm for the Cingular web site, the main navigational elements are unordered lists. The drop-down functionality is still Javascript-driven, but the sub-menus are also unordered lists. The menus themselves are easy to maintain and move around as needed, and the functionality (aside from the calls to the JS functions) is completely separate, and those were my two main goals.