Style Sheets
  Home arrow Style Sheets arrow Page 3 - Cross Browser Issues: CSS Hacks Explained,...
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 
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? 
STYLE SHEETS

Cross Browser Issues: CSS Hacks Explained, Tips, Tricks and Fixes
By: Jennifer Sullivan Cassidy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 17
    2006-01-25

    Table of Contents:
  • Cross Browser Issues: CSS Hacks Explained, Tips, Tricks and Fixes
  • The Use of JavaScript and CSS
  • Hiding CSS from Buggy Browsers
  • Workarounds for Internet Explorer
  • More Workarounds for Internet Explorer

  • 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


    Cross Browser Issues: CSS Hacks Explained, Tips, Tricks and Fixes - Hiding CSS from Buggy Browsers


    (Page 3 of 5 )

    It may be in your best interest for several reasons, to simply hide CSS files from certain browsers.  One reason to do this would be that providing browser support for many browsers takes a lot of time, especially if you change your site often.

    There are a few hacks to enable you to do this.  Here is one that basically allows you to place the CSS code that all browsers understand in your current style sheet, yet hide the more complex, separate style sheet from the browsers that don’t understand the directives contained in it, particularly IE 3 and Netscape 3:

    /* CSS style sheet - hide from IE3 and Netscape 3 */

    @import url(compliant_browsers.css);

    Because the chances are slim that people are still using these browsers anymore, you will probably want something that deals with newer browsers:

    /* CSS style sheet - hide from IE4 */

    @import "compliant_browsers.css";

    Or, for hiding individual properties that render oddly in IE 4 and 5:

    color/*This comment is to hide this property from IE4 and IE5 */ : red

    Once you’ve decided whether to use a single style sheet for your CSS design purposes, or particular ones for each browser type, or to simply hide them from outdated browsers that don’t support CSS, it’s time to look at what the workarounds may be for the browser issues we talked about.

    More Style Sheets Articles
    More By Jennifer Sullivan Cassidy


     

    STYLE SHEETS ARTICLES

    - Improving the Visual Presentation of a CSS D...
    - Fixing Browser Incompatibilities in a CSS Dr...
    - Building Clean Drop-Down Menus with CSS
    - Creating Hybrid Web Page Layouts with Negati...
    - Creating Three-Column Web Page Layous with N...
    - Swapping Column Positions in Web Page Layout...
    - Creating Web Page Layouts with Negative Marg...
    - Creating Gradients for Individual Containers...
    - Creating Gradients for Web Page Headers with...
    - SEO Scrolling Frames Problem Solved
    - Building Cross-Browser Background Effects wi...
    - CSS: Pseudo
    - Using PNG Images to Build Background Effects
    - CSS: Continuing the Clarification of CSS Cla...
    - CSS: Top Secret Classification






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
    Stay green...Green IT