Web Authoring
  Home arrow Web Authoring arrow Page 4 - Using Proper DOCTYPE to Fix Browser Compat...
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  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
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? 
WEB AUTHORING

Using Proper DOCTYPE to Fix Browser Compatibility Issues
By: Anthony
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 20
    2005-01-26

    Table of Contents:
  • Using Proper DOCTYPE to Fix Browser Compatibility Issues
  • Stop Beating Yourself Up and Read
  • The Proof is in the Pudding
  • The Truth about Internet Explorer 6

  • 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


    Using Proper DOCTYPE to Fix Browser Compatibility Issues - The Truth about Internet Explorer 6


    (Page 4 of 4 )

    The most significant modification in my mind is the addition of dual CSS rendering engines, which will help IE6 comply with the guidelines set forth by the W3C. Any changes causes some discomfort, however. At least one of these discomforts will undoubtedly create mayhem among Web pages whose very life depends on how their style sheets are set up and what DTD is defined. The three main categories that changes have rippled through are among: Hexadecimal Color Codes, Font Size Definition, and Case sensitive CLASS and IDs.

    In the case of Hexadecimal Color Codes, you must remember now to place a pound symbol (#) at the start of the code. No more is the infamous RGB color code to look like this:

    Table { background-color: FFFFFF }

    Now the code must be represented with the (#) symbol as shown below:

    Table { background-color:  #FFFFFF }  

    Here are some examples of proper usage of Hexadecimal Color Codes:

    For Page Backgrounds:
    <body bgcolor="#hexdec">

    For Text Colors:
    <font color="#hexdec">

    For Page-Wide Link and Text Colors:
    <body text="#hexdec" link="#hexdec" vlink="#hexdec" alink="#hexdec">

    (where text is text color, link is non-visited link color, vlink is already-visited link color, and alink is the color a link turns at the second it is clicked)

    With reference to Font size Definition, no longer will you be able to have blank white space within the font size definition as shown below:

    P {font-size : 14 px }  

    Above, you can see that white space exists between the number classification and the classification type. Below you will find the proper way to incorporate the appropriate tag:

    P  { font-size : 14px }  

    Last but not least we tackle the case-sensitive CLASS and IDs. This is perhaps the most critical of all to ensure proper practices.  In this example I have defined a class for a navigation bar to be as follows:

    .nav { font-family : Arial; font-size : 14px }


    Later we will assign this class to the navigation area by wrapping a DIV tag around our navigation links, like in the example below:

    < DIV CLASS= “Nav”>
     … navigation links…
    </DIV>
     

    Since class names are now case-sensitive, the new rendering engines will no longer associates the ".nav" class with the reference in our DIV tag. This will cause some stir, since it will most definitely become the reason why we lose all style definition for the navigation area, but this is a problem that we can bear for the time being. Although these changes aren't the only differences, they may be the ones you'll most likely encounter. To see a full list of differences, see the reference on Microsoft's Web Site that the company has put together. It will make a big difference in how you view these new rendering engines. 

    Food For Thought

    I understand that I have tackled this issue from one perspective and may not have included the other browser compatibility issues out there, but I wanted to focus this article on the most common mistakes of HTML coding being used and duplicated…tied in with the headaches and pains of the new IE 6. If there are other practices that I may not have mentioned that also combat this issue, please feel free to post comments to this article outlining those non-conventional methods to suppress those darn Browser Compatibility Issues.


    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.

       · This was my first article written, so please be gentle but honest. Thank you for...
       · While I appreciate this being your first article, what persuaded you or, better...
       · Great stuff - very useful. But please don't use images to show text. I found the...
     

    WEB AUTHORING ARTICLES

    - Yahoo Pipes: Worth a Look
    - Completing an EAR
    - Building and Deploying an EAR
    - New Nuke Security Sentinel: Worth Taking a C...
    - Administering Your CMS-Based Web Site
    - What You Need to Know Before Using a CMS
    - Introducing the Google Maps API
    - An Overview of the Yahoo User Interface Libr...
    - Basic configuration of osCommerce, concluded
    - Basic configuration of osCommerce, continued
    - Basic configuration of osCommerce
    - Deploying your Site with PHPEclipse, continu...
    - Deploying your Site with phpEclipse
    - Macromedia Captivate Review
    - Macromedia and Adobe Planning to Tie the Knot







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway