two style sheet for one page

Associate
Joined
22 Dec 2004
Posts
1,828
Location
Southampton, UK
Ok my question is this it it possible to have two style sheets for one page?

The site has 6 pages as follows:

Index about the site
forum
resources
fun stuff
links
suppliers

Basically around the outside of all the page everything stays the same for each page visited, but the inside changes.

Now is it possible to have one style sheet with all the outside info on it link to from each page and then have an inside style sheet for each page?

If yes how would you go about it?
Is it just a case of putting them both in as so:
Code:
<link href="vbulletin.css" rel="stylesheet" type="text/css" />
<link href="suppliers.css" rel="stylesheet" type="text/css" />

And making sure there are no duplicate IDs or classes

Edit: the current CSS is Vbulletin as also styles the forums and is currently internal.
 
Last edited:
yep it is, as i have:
Code:
<link rel="stylesheet" type="text/css" href="setup.css" />
<link rel="stylesheet" type="text/css" href="text.css" />
just make sure they don't conflict

with things like this, it's alway's easier to just try it!

simply add 1 simple tag in each, i.e. change background to red in one, and text colour to blue in the other, and see if it does it!!

Lad.
 
Last edited:
llaadd said:
yep it is, as i have:
Code:
<link rel="stylesheet" type="text/css" href="setup.css" />
<link rel="stylesheet" type="text/css" href="text.css" />
just make sure they don't conflict.
Bear in mind that if two [equal] rules do conflict, then the last rule will take precedence i.e. the rule in the second stylesheet, according to the rule of the cascade (the C in CSS ;)).

You can get round this by changing the specifity of the overidden rule e.g. #content p#message has a greater specifity to p#message (link).
 
Back
Top Bottom