Fixing Browser Incompatibilities in a CSS Drop-Down Menu
Drop-down menus have long been an important part of numerous web-based user interfaces. Since they have been around so long, we've seen many different approaches to building them, from pure JavaScript-driven menus, Flash-based ones, and simple, well-structured (X)HTML markup. This three-article series shows you how to build a drop-down menu using only clean and tight structural markup, along with a few simple CSS styles and a bit of JavaScript code.
Fixing Browser Incompatibilities in a CSS Drop-Down Menu - The modified version of the CSS-based drop-down menu (Page 5 of 5 )
As I promised in the previous section, here's the full source code that corresponds to the drop-down menu, this time including all the modifications that you saw before:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
In addition, you may want to download all the supporting material for this drop-down menu here (link), so you can test it on your own browsers much more quickly and easily.
Final thoughts
In this second part of the series, I introduced some minor changes to the original version of this drop-down menu to make it compatible with Internet Explorer. Nonetheless, this educational journey hasn't finished yet, since in the last article of the series I'll show you how to make the menu look slightly more compelling to potential users.
Now that you've been warned, you won't want to miss it!
DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.