Forum Moderators: not2easy

Message Too Old, No Replies

@import and netscape 6x

         

jarow

12:18 pm on May 17, 2004 (gmt 0)

10+ Year Member



Netscape recognizes all the following styles when I have the styles directly on the page:

<style type="text/css">
<!--
select {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: bold;
}
form
{
margin: 10px;
}
#optsub
{
color: #000099;
}

-->
</style>

However, when I try to import the above as a separate style sheet , Netscape does not maintain font size nor font weight. Here is the import code I am using:

<style type="text/css">
<!--
@import url("libraryitems.css");
-->
</style>

Any idea what the problem is?

Many thanks.

P.S. import works fine in IE

choster

1:33 pm on May 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Which Netscape? NS 4 does not support @import at all.

Be sure the path to libraryitems.css is correct. If it's in your root directory and the file is being delivered from the /products subdirectory, you'd need to change your url to ../products.

Also, browsers seem to be picky about url-- different versions and platforms prefer different methods of spacing and quotes. According to [dithered.com...] , using the url(somefile.css) form (no space between url and the opening parenthesis, no quote marks) appears to be the most widely supported.

DrDoc

4:59 pm on May 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1) Do not use quotes for the url attribute
2) Do not use HTML style quotes if it's an XHTML page (personally, I'd get rid of them altogether)

TheDoctor

9:06 am on May 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Different browsers recognise different specs for the @import statement. You might like to check out who ignores what [centricle.com]. NN4 ignores all possible alternative formulations.

DrDoc

12:27 am on May 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



NN4 ignores all possible alternative formulations.

Good thing this is NN6 then ;)

when I try to import the above as a separate style sheet...

You're not including the <style> tags in the external style sheet, are you?