Style Sheets
  Home arrow Style Sheets arrow Fixing Browser Incompatibilities in a CSS ...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
STYLE SHEETS

Fixing Browser Incompatibilities in a CSS Drop-Down Menu
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 2
    2008-10-22

    Table of Contents:
  • Fixing Browser Incompatibilities in a CSS Drop-Down Menu
  • Review: the initial source code for the CSS-based drop-down menu
  • Fixing browser incompatibilities
  • Adding JavaScript to correct browser incompatibilities
  • The modified version of the CSS-based drop-down menu

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Fixing Browser Incompatibilities in a CSS Drop-Down Menu


    (Page 1 of 5 )

    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.

    Now that I have introduced the subject of this series, let me offer you a brief summary of the topics that I covered in the previous tutorial, in case you didn't have a chance to read it. All right, as I said in the beginning, the purpose of this article series is to illustrate how to create an extensible drown-down menu by utilizing only a combination of standard markup and CSS styles. In this way I hope to demonstrate that seemingly-complex web user interfaces can be created without the need to appeal to complicated development methodologies.

    Based upon the previous concept, in the first article of this series I showed you how to build the bare bones structure of a CSS-based drop-down menu. It was comprised originally of some basic (X)HTML unordered lists and links, along with a few straightforward CSS styles. As you'll recall, at the end of that particular tutorial, I turned the menu into a fully-functional piece of code, relying only on the correct support offered by most non-based IE browsers for the "hover" CSS pseudo-class.

    Unfortunately, Internet Explorer doesn't support this crucial feature, which means that it'll be necessary to incorporate some JavaScript code into the initial incarnation of this drop-down menu to make it work with IE too. Of course, this implies that part of the accessibility offered by the menu in question must be sacrificed, but that's the cost one has to pay for using non-standard browsers.

    So far, so good. Now that you hopefully recalled the most important concepts regarding the development of this CSS-based menu, it's time to see how to add  a short piece of JavaScript code to its initial definition, which will make it work seamlessly with Internet Explorer.

    With the preliminaries out of the way, let's continue this instructive journey now!

    More Style Sheets Articles
    More By Alejandro Gervasio


       · In this second chapter of the series, support for the CSS hover pseudo class is...
       · I really enjoyed your article, and plan on using it in future website designs. The...
       · Thanks Alicia for the words on my article. Of course that specific CSS classes...
     

    STYLE SHEETS ARTICLES

    - Styling HTML Lists with CSS: Replacing Bulle...
    - Styling HTML Lists with CSS: Changing the Ap...
    - Styling HTML Lists with CSS: Manipulating Pa...
    - Styling HTML Lists with CSS: Specifying Pad...
    - Styling HTML Lists with CSS: Resetting Paddi...
    - Absolute Positioning in CSS: a Dynamic Menu
    - CSS Absolute Positioning: Creating a Quick S...
    - CSS: Building Tooltips with Absolute Positio...
    - Styling Pseudo Classes with the RGBA CSS3 Pr...
    - Controlling Overall Transparency of an HTML ...
    - Altering the Border Opacity of an HTML Eleme...
    - The RGBA CSS3 Property: an Overview
    - Using Span Tags to Include Logos in Web Pages
    - Using a Single H1 Element to Include Logos i...
    - Combining Divs and H1 Elements to Include Lo...







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 10 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek