Reply
Style sheets...how to use more than one?
Old 10-13-2006, 06:45 PM Style sheets...how to use more than one?
Experienced Talker

Posts: 45
Name: Julie
Trades: 0
I am such a newbie, so to most of you this will sound like a dumb question.

When you have more than one style sheet, how do you reference it/them on your XHTML page? I mean so that if you use one style sheet for something but another for something else, the XHTML page will reference the correct one.

Thanks!
Jules
Jules is offline
Reply With Quote
View Public Profile
 
 
When You Register, These Ads Go Away!
Old 10-14-2006, 12:27 AM Re: Style sheets...how to use more than one?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,942
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Code:
<link rel="stylesheet" type="text/css" href="screen.css" media="screen">
<link rel="stylesheet" type="text/css" href="print.css" media="print">
That's an example using screen and print. You can add as many stylesheets as you want between your <head></head> tags and use the media attribute (optional) to control what they're used for.

You can even use multiple stylesheets for the same thing if you like.
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 10-14-2006, 12:37 PM Re: Style sheets...how to use more than one?
Experienced Talker

Posts: 45
Name: Julie
Trades: 0
Thanks, Adam! It was pretty simple, eh? I'll get this "stuff" ~ so glad ya didn't laugh at my question...

Jules
Jules is offline
Reply With Quote
View Public Profile
 
Old 10-14-2006, 03:59 PM Re: Style sheets...how to use more than one?
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,942
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
No need to laugh.

All learning starts with the simple phrase...I do not know.

-- Kwai Chang Caine
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 10-16-2006, 05:04 AM Re: Style sheets...how to use more than one?
Average Talker

Posts: 16
Trades: 0
Hi Jules,

Another way to do it is using @import.

In the HTML/XHTML doc:
<style type="text/css">
@import url("styles.css");
</style>
A good thing is that you can have one css file that imports all your other ones, example of a css file:
@import url("style1.css");
@import url("style2.css");
@import url("style3.css");

That way you can add/remove css-files without having to edit several html/xhtml files.
__________________
Pingdom.com - Web Site Monitoring. 30 day free trial including 20 SMS alerts.
Pingdom is offline
Reply With Quote
View Public Profile
 
Old 10-18-2006, 09:06 PM Re: Style sheets...how to use more than one?
Experienced Talker

Posts: 45
Name: Julie
Trades: 0
Thank you, Pingdom!

I'll give this a shot, too.

Jules
Jules is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Style sheets...how to use more than one?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.09920 seconds with 13 queries