Very quick CSS question (multiple stylesheets)

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Dt7

Thread Starter
Joined
Jul 25, 2005
Messages
74
I'm rushing a site for a friend that we want to release tomorrow, and I need to know, is it possible to have two stylesheets linked on one page? One for layout, like div box sizes and locations, and another for styles such as colour and images?

I'm asking because I tried this before and it only seemed to acknowlege one stylesheet, wondering if I was doing something wrong.
 
Joined
Dec 22, 2004
Messages
721
Hi Dt7.

Yes it is possible.

I do it also (only to make it easier to edit later).

Mine works if each link is callled separately and each sheet has a different name. Such as:

Code:
<link rel="stylesheet" href="includes/pagelayout.css" type="text/css" media="all"></link>
<link rel="stylesheet" href="stylesheet.css" type="text/css" media="all"></link>
Try that.

Deep.
 
Joined
Apr 30, 2005
Messages
3,012
Yep, that's what Cascading means in Cascading Style Sheets.

If it couldn't, then it would just be called 'SS' instead of 'CSS'

You can also embed one external style sheet directly into another if you want.

Like stated above, you can link to more than one style sheet per page :)
 

Dt7

Thread Starter
Joined
Jul 25, 2005
Messages
74
Alright thanks, I must have been doing something wrong last time :p
 
Joined
Dec 22, 2004
Messages
721
Thanks namenotfound.

Never thought of embedding a stylesheet within another. (y)

That will definitely work. Nice hint. :cool:
 
Joined
Apr 30, 2005
Messages
3,012
For those that are wondering how to do it (embed one in another).

In one .css file, add @import url('secondfile.css');

Here is an example in the screen shot
 

Attachments

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top