Hey there, thanks for visiting Painted Foot. This site looks lurvely in any modern browser, but if you’re seeing this message, you’re not using one! Bummer. Check out the newest browser versions from Firefox, Netscape, Opera or Microsoft . Download a copy today because you're missing out. If you’re seeing this on a thin client (cell phone, PDA, etc.), as you were.

Blog
CSS: Escape from NS4 PDF Print E-mail
Written by Catherine F. Laine   
Sunday, 04 June 2006

Because NS4 has this evil tendency to crash when served up certain CSS commands, it is often useful to get that granny browser to ignore your stylesheets altogether. Here are several ways to do this.

Using the import rule:

  1. <style type="text/css">
  2. @import "style.css";
  3. </style>

Using the above syntax, the stylesheet  is hidden from nearly all version 4 browsers.  To hide just from NS4 use

  1. <style type="text/css"> 
  2. @import url("style.css");
  3. </style>


Caveat: With this hack, you get a FOUC or flash of unstyled content in some browsers.If this is the sort of thing that gives you hives, you can use this hack instead:

<link rel="stylesheet" type="text/css" xhref="ns4begone.css" media="screen, projection" />

Note that screen and projection are separated by a comma. To specify all media types, use media="all".

For more info see:

http://css-discuss.incutio.com/?page=ImportHack 
http://www.w3.org/TR/REC-CSS2/media.html
Last Updated ( Monday, 05 June 2006 )
 
< Prev   Next >



 
Painted Foot © 2006
Appropriate Infrastructure Development Group