what does this do?Code:<style type="text/css"><!-- @import url("mycss.css"); --></style>
| SitePoint Sponsor |

what does this do?Code:<style type="text/css"><!-- @import url("mycss.css"); --></style>
Last edited by hpnadig; Nov 25, 2003 at 22:33. Reason: put the code in a code box :)
Home Page| Blog | Gallery
sys op & contributor @ kn wikipedia
Still stuck with a stinky browser? Go get FireFox
It imports the CSS file called "mycss.css" to that page.
The idea is that you can refernce CSS pages inside CSS pages.
Check the source and CSS file of www.stopdesign.com to see what I mean.

that was a nice link!
But I don't get what the difference is between <link..... > and @import...
Home Page| Blog | Gallery
sys op & contributor @ kn wikipedia
Still stuck with a stinky browser? Go get FireFox


Hi,
There are a number of threads already that discuss this and you should see a list of "similar threads" at the bottom of the page.
Here's One:
http://www.sitepointforums.com/showthread.php?t=112588
Paul


the bottom line is that some browsers do not support the @import code, for those browser this is a nice way not to import a style they do not support in the first place :-)
Latest projects: www.theaterhal4.nl / www.kristaizelaar.nl


I haven't been able to get teh url part to work in IE. I use @import "stylesheet.css" instead.
Besides the above comment about hiding the style sheets from older browsers such as NN4, I've also read that the <link> tag when used with @import can also have to solve a few browser glitches.

Originally Posted by Paul O'B
oh, yeah.. I should've searched before postingthere's plenty of info already. Thanks!
Home Page| Blog | Gallery
sys op & contributor @ kn wikipedia
Still stuck with a stinky browser? Go get FireFox
Bookmarks