copyright © CSSPG, lud October 18 2000


 for practical use of CSS

Tips

this document is located at...
<URI:http://css.nu/pointers/liam-tip.html>

* Excluding Netscape from external CSS *

In response to a ciwas post describing errant NN4 behaviour in rendering a CSS-enhanced input button, Liam Quinn offered the following suggestion:

 
I think the best approach to avoiding this Netscape bug is to exploit another Netscape
bug:  put your style sheet in an external file LINKed (or in a STYLE element)
with MEDIA="screen, projection".  Due to a bug, Netscape 4.x will ignore any LINK or
STYLE that uses a MEDIA value other than "screen". A list of MEDIA values is at:
<http://www.htmlhelp.com/reference/css/style-html.html>.

For example:

<HEAD><TITLE>Test</TITLE>
<STYLE TYPE="text/css" MEDIA="screen, projection">
<!--
  input {
    background-color: rgb(0,0,0);
    color: rgb(0,255,0);
    font-weight: bold;
    border: medium ridge rgb(0,255,0)
}
-->
</STYLE></HEAD>
<BODY>
<FORM ...>
<INPUT TYPE=submit VALUE="Submit">
</FORM>

-- 
Liam Quinn
Web Design Group            Enhanced Designs, Web Site Development
http://www.htmlhelp.com/    http://enhanced-designs.com/

Please note that you only need to exclude those specific elements which Netscape mangles. [Stop, gordon, I hear you laughing ;-)] You can take real advantage of the 'cascading' part of CSS to allow acceptably rendered CSS in NN4.

Steve Knoblock's explanation of importing style sheets is an excellent resource to use for this purpose.


CSS Pointers Navigation
Index · Browser Bugs · Books · Tools · DHTML · XSL & DSSSL
Main Site Navigation
Index · Articles · Examples · Experiments · FAQ · Markup · Styles · Who is?
CSSPG ~ Sue ~ Roland
Validate markup Check CSS