external CSS: @import

liunx

Guest
I'm working on my change from HTML 4.01 Transitional to Strict. Notice somewhere that using @import, apparently, rather than what I have now:


<link rel="stylesheet" href=http://www.webdeveloper.com/forum/archive/index.php/"cwstrict.css" type="text/css">


takes care of difficulties with Netscape 4. So should I change from the illustrated form to @import? If so, how do I make such a statement? I have a feeling I should have found it somewhere easily, but as such a babe in the woods, I'm lost, so I apologize for the question, but ask it anyway <g>.

Tue, 01 Feb 2005 18:34:57Instead of the link you set up for an embedded style sheet then use the @import inside of that. The strategy is to only put "old browser" styles in the linked sheet then @import the "advanced" styles.Hello Carol,

Here is the statement you asked for :

<STYLE TYPE="text/css">
@import url("http://www.yourwebsite.com/screen.css") screen;
@import url("http://www.yourwebsite.com/print.css") print;
</STYLE>

The 'screen' or 'print' definitions are optional.

'screen' sets styles on a monitor, 'print' sets styles for a
printed page (usualy for a printer-friendly page).

Greetz from The Netherlands!
Jascha.Originally posted by ray326
Instead of the link you set up for an embedded style sheet then use the @import inside of that. The strategy is to only put "old browser" styles in the linked sheet then @import the "advanced" styles.

Hw interesting! I'll have to study up on that to discover quite what you mean, Ray, but I begin to get the idea, and now at least have numbers of resources from which to study; so many are mentioned here. My Bookmarks list is getting very, very long, haha!

Thanks a lot, Ray!

Tue, 01 Feb 2005 20:22:07Originally posted by ChiP_1976
Hello Carol,

Here is the statement you asked for :

<STYLE TYPE="text/css">
@import url("http://www.yourwebsite.com/screen.css") screen;
@import url("http://www.yourwebsite.com/print.css") print;
</STYLE>

The 'screen' or 'print' definitions are optional.

'screen' sets styles on a monitor, 'print' sets styles for a
printed page (usualy for a printer-friendly page).

Greetz from The Netherlands!
Jascha.

ChiP, how nice of you to make your first post here a helpful reply to my request for information! Your explanation is helpful too; thanks a lot! And welcome to the forums. I'm not a programmer at all, so it's hard for me, but have been getting wonderful help here! To which you've now contributed. I'm very grateful. And greetings back to you!

Tue, 01 Feb 2005 20:24:55
 
Back
Top