
December 22nd, 2003
03:41 AM
23, mother, art slave, code monkey
Status: Offline!
@import is driving me insane.
I have this little tidbit in my index file:
<link rel="stylesheet" type="text/css" href="dijitalsin_mutedregrets.css" media="all">
<style type="text/css" media="all">
<!--
@import: url('dijitalsin_mutedregrets.css');
-->
</style>
The stylesheet link works perfectly for IE but for the love of code FB is hating @import at the moment. Did I miss something?
Site is here: http://sineptor.port5.com
___________________
And the sig ran away with the spoon.

December 22nd, 2003
07:13 AM
Remove the comment tags (<!-- and -->); they'll cause some browsers to (correctly) treat the @import command as a comment, and therefore not parse it.
@import, by the way, is not like traditional CSS commands. No colon should be present, and browsers that correctly follow W3C recommendations (e.g. Firebird) will choke on it and not parse the line.
Also, its good practice to not use quotation marks when including something via URL in CSS, as doing so can cause errors in certain browsers.
So, in totality, replace your code with:
<link rel="stylesheet" type="text/css" href="dijitalsin_mutedregrets.css" media="all">
<style type="text/css" media="all">
@import url(dijitalsin_mutedregrets.css);
</style>
and it should work correctly.
And, might I ask, why are you importing the same stylesheet twice, once with link and once with @import?

December 22nd, 2003
07:22 AM
Originally posted by Gichin Funakosh
And, might I ask, why are you importing the same stylesheet twice, once with link and once with @import?
I would imagine because some browsers don't support it. Although that's actually the advantage of using it (primarily to hide the CSS from Netscape 4.x and other browsers in which have poor CSS support).
___________________


December 22nd, 2003
11:03 PM
I would imagine because some browsers don't support it. Although that's actually the advantage of using it (primarily to hide the CSS from Netscape 4.x and other browsers in which have poor CSS support)
No, that would be the advantage of including two different stylesheets, one via link (typically a less advanced stylesheet that can be parsed by NSN 4.x) and one via @import (for modern, standards-compliant browsers).
As far as I know, including the same stylesheet twice accomplishes nothing, and I suspect might even cause some browsers to choke. That's why I asked Mel what his intentions were---perhaps he was trying to do what you describe, but accidentally forgot to include two unique stylesheets.

December 22nd, 2003
11:36 PM
Good point, that just may be the case.
___________________


December 23rd, 2003
04:38 AM
23, mother, art slave, code monkey
Status: Offline!
Originally posted by Gichin Funakosh
<link rel="stylesheet" type="text/css" href="dijitalsin_mutedregrets.css" media="all">
<style type="text/css" media="all">
@import url(dijitalsin_mutedregrets.css);
</style>
Tried that, doesn't work.
And, might I ask, why are you importing the same stylesheet twice, once with link and once with @import?
Because I thought IE reads the link and moz/fb reads the import? Was I wrong in this?
Problem could be with my css, because that brown bgcolor and font/link options show fine. I may have other tags that fb doesnt recognize. My stylesheet is here: http://sineptor.port5.com/dijitalsin_mutedregrets.css
___________________
And the sig ran away with the spoon.
Last edited by sinsation, December 23rd, 2003 04:47 AM (Edited 1 times)

December 23rd, 2003
04:59 AM
From your external stylesheet:
<STYLE type="text/css">
<!--
Remove that code. Only CSS code belongs in an exteral stylesheet (just like only JavaScript belongs in an external JavaScript source file).
___________________


December 23rd, 2003
05:22 AM
23, mother, art slave, code monkey
Status: Offline!
Dude!
I love you. lol
___________________
And the sig ran away with the spoon.

December 24th, 2003
04:52 AM
thinking of something witty to put here
Status: Offline!
A little tip: Use @import "yo.css" to hide from 4.0 browsers.
<style type="text/css">@import "bagpipefestivalhomepage.css";</style>