Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic generation of styles

Status
Not open for further replies.

gus121

Technical User
May 9, 2002
298
GB
Hi i currently have an external style sheet which defines the look and feel of my websites.

I am now planning to restyle the colour of the websites based on which section the customer is in i also wish to make sure that the websites remians easily updateable so that i dont have to edit a number of style sheets each time i wish to make a change.

My question is is it possible to have a style sheet with just the style differences between the two websites and if so should this be defined before or after the standard style sheet and does it have to include the whole class reference or can it be repeated with just the differences? how is this best done?

Here is an example of a class which has a different backround colours:

section: 1
div.rncats ul li {
margin:0px;
padding:3px 0px 0px 0px;
background-color: #DDEDFA;
}
section: 2
div.rncats ul li {
margin:0px;
padding:3px 0px 0px 0px;
background-color: #E3F8E3;
}


would it possible to do this for example:

section: standard
div.rncats ul li {
margin:0px;
padding:3px 0px 0px 0px;
}

section: 1
div.rncats ul li {
background-color: #DDEDFA;
}

section: 2
div.rncats ul li {
background-color: #E3F8E3;
}

is this the best method?

thanks


-Gus
 

You got it - that should work fine. CSS rocks, doesn't it?

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
thanks for your swift reply

-Gus
 
That would be the Cascading part of Cascading Style Sheets?


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top