Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape 6.1 ignores @import!

Status
Not open for further replies.

Sensibilium

Programmer
Apr 6, 2000
310
GB
Okay, this is complicated (it seems that way to me anyway).

After spending ages reading up at w3c regarding Transitional HTML 4.01 and CSS, I redesigned my site to use CSS for positioning of elements, removing the need for nested-tables.

is my site, which if looked at using IE5.5 it displays the design perfectly, as it does when using Opera 5, and I seem to remember that the design displayed correctly in Netscape 6.

But with Netscape 6.1, it displays the page like Netscape 4.7! Effectively ignoring the @import command I use to stop non-compliant browsers from using that particular stylesheet! I've spent the last week trying to solve this, without luck.

Any ideas people? Thanks in advance :) Ahdkaw
"What would you expect from a bunch of monkeys?"
Where the sensible gather... or so they say.
 
Could you post your code? Most likly its a syntax error in your css.

Try

<style type=&quot;text/css&quot;>
<!--
@import &quot;myfile.css&quot;;
-->
</style>

I use this technique all the time and it works just fine for me in Netscape 6.1

(might be the semicolon -- have had that problem before. Also watch out on which kinds of slashes you use in the url, Netscape won/'t accept anything but /) ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
Okay, here's the code after trying what you said:

<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;
&quot;<HTML>
<HEAD>
<TITLE>Sensibilium; Where the sensible gather...</TITLE>
<LINK rel=&quot;stylesheet&quot; href=&quot;/css/standard.css&quot; type=&quot;text/css&quot; />
<STYLE type=&quot;text/css&quot;>
<!--
@import &quot;/css/realstyles.css&quot;;
-->
</STYLE>
<SCRIPT language=&quot;JavaScript&quot; type=&quot;text/javascript&quot; src=&quot;/includes/stdfunctions.js&quot;></SCRIPT>

<META http-equiv=&quot;Content-Language&quot; content=&quot;en-gb&quot;>
<META http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
<META name=&quot;description&quot; content=&quot;Ordo Templi Sensibilium. Purveyors of the odd. Plenty of articles and much more.&quot;>
<META name=&quot;keywords&quot; content=&quot;ahdkaw, AHDKAW, Ahdkaw, Sensibilium, Ordo, Templi, Zeno, ZENO, zeno, zetetic,
ahdli, kawshus, spasm, matneee, legion, baal, nolef, arrow, miscellania, miscallania, miscellanea, heads, monkeys, chaos,
discordia, forum, discussion, links, OTS, ots, gumbo, profane, dog&quot;>
</HEAD>

I still get the same problem. ~maybe~ it has something to do with having two different style files? Ahdkaw
&quot;What would you expect from a bunch of monkeys?&quot;
Where the sensible gather... or so they say.
 
Sometime NN doesn't read your &quot;/&quot; before the reference as in: href=&quot;/css/standard.css&quot;
Try instead to write: href=&quot;css/standard.css&quot;

And I don't understand your this &quot;/>&quot; in the end of this line: <LINK rel=&quot;stylesheet&quot; href=&quot;/css/standard.css&quot; type=&quot;text/css&quot; />
Is that right?

Greetings Rasmus
 
I've tried:
href=&quot;css/realstyles.css&quot;

NN6 gets the standard.css file without a problem, but it's realstyles.css that's being ignored.

The &quot; />&quot; at the end of the LINK tag is part of the standards of HTML4.01, and makes no difference if removed.

Below is the modified code so far:

<LINK rel=&quot;stylesheet&quot; href=&quot;css/standard.css&quot; type=&quot;text/css&quot;>
<STYLE type=&quot;text/css&quot;>
<!--
@import &quot;css/realstyles.css&quot;;
-->
</style>

Even IE6 suffers the same problem apparently... Ahdkaw
&quot;What would you expect from a bunch of monkeys?&quot;
Where the sensible gather... or so they say.
 
I'm also concerned that it might have something to do with having multiple CSS files... But I don't really know for sure, as without BOTH css files the design will not come through...

I'm on the verge of merging the CSS files, and just ignoring NS4.7- & IE3- altogether... Ahdkaw
&quot;What would you expect from a bunch of monkeys?&quot;
Where the sensible gather... or so they say.
 
Yeah its the multiple css files. Since IE6 doesn't do this either, and you are invoking IE6 in standards mode by putting the url in your doctype -- its a standards problem. Try putting the <style> tag before the link and see if that helps. ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
Right, I got the little b*st*rd! =)

Apparently it has very little to do with multiple stylesheets, although NS6 & IE6 are a little buggy with them.

The actual problem was case-sensivity. In IE5.5 and Opera 5, the CSS IS NOT case-sensitive, but NS6, and also IE6, ARE case-sensitive.

For example:
My first DIV on my page is called as so -
Code:
<DIV ID=&quot;LogoTop&quot;>Logo</DIV>
But in my CSS file it was described as -
Code:
#LOGOTOP

NS6 & IE6 will NOT realise that this is the same ID as that called from the page, even though IE5.5 & Opera 5 will.

To fix this then, all I had to do was edit my CSS file (I have now incorporated both CSS files into one), to the following:
Code:
#LogoTop

So, let that be a warning to everyone (myself included), make sure your CSS settings are case-sensitive at all times. Ahdkaw
&quot;What would you expect from a bunch of monkeys?&quot;
Where the sensible gather... or so they say.
 
Thats correct behavior -- CSS is case sensitive. ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top