Forum Moderators: not2easy
But you can specify a style sheet by putting
<style>
@import stylesheet.css
</style>
in the "head" part of the page (where you replace "stylesheet.css" with your own style sheet name, of course).
This means that your styles will not be applied when the browser is NN4.x
the one i thought about (just to complete) is documented here (css2) [w3.org] (the one posted first does the same): @import url("fineprint.css") print;
@import url("bluish.css") projection, tv;
unfortunately, i can't tell you how to do. in my opinion the link-version is a css1 spec whereas @import a css2 spec is. in css2 i was not able to find the alternative stylesheet - there are other mechanisms to wieght between author and user. correct me please if i'm wrong.
-hakre
<LINK rel=stylesheet type="text/css" HREF="stylesheet.css"> works but it includes NS4.
I've tried the following two but then even the new browsers don't pick up my stylesheet
<style> @import stylesheet.css </style>
<style type="text/css"> @import ("stylesheet.css"); </style>
I must be missing something. Someone mentioned you still need link but I don't know how to write the code.
Any help you be great.
Thanks
NN4
<link rel="stylesheet" type="text/css" media="screen" href="styles/basic.css">
Others
<link rel="stylesheet" type="text/css" media="all" href="styles/main.css">
OR
<style type="text/css" media="screen">@import "styles/main.css";</style>
In my own website I do exactly this:
<style type="text/css" title="User Defined Style">
@import "css/php_main.css";
</style>
Note that setting the title attribute of the style tag enables you to set "Use Stylesheet" to "none" in Netscape. Without naming the stylesheet, you can't do it. I hope that helps.
Michael