View Full Version : Multiple Css Stylesheets (one for each page ) has to be an easier way.
squiwrl
05-23-2006, 10:44 AM
So Basically im trying to create the shell of my site.
http://www.thinkstylestudio.com/beta/contact.html
That page has the most up to date css file.
The thing is there must be an easier way to get the site to function the way it does without using a different style sheet for each page.
Basically I can't think of how to make it more effecient and simple. :rolleyes:
Any help would be greatly appreciated. Thanks all. :D
p.s if you guys notice anything that is crappy about the code or suggestions im ALL ears to. Thanks a tone.
Squiwrl
ronaldb66
05-23-2006, 12:12 PM
You could give each body a unique id and use that in the selectors specific for each page; that way, you can still place all the styles in one sheet and benefit from reusing common styles like font settings, etc.
squiwrl
05-23-2006, 08:22 PM
Yeah that would be awsome.
I think the part that is messing me up is how to make the link select another id...
i know its simple but for the life of me i can't think of how to do it. Any thoughts?
Or if there is an example you can point me 2 that would be the best.
I get things very easily if i see something.
Take care
squiwrl
p.s thanks!
ronaldb66
05-24-2006, 08:07 AM
It looks like you are reusing certain ids on each page while wanting to style them differently; for example, styling the div with id "contact" would require a selector looking like this:
#contact {...}
Now, if you would assign a unique id to the body element of the contact page, say "contpage" ("contact" is already in use), "portpage" to the portfolio page and "homepage" to the home page, you could individually style each contact div with the following selectors, all in one style sheet:
#contpage #contact {...}
#portpage #contact {...}
#homepage #contact {...}
By the way: you've assigned similar classes to the links inside the various divs; this isn't necessary unless you want to style more then one link and style them differently. If you simply want to assign a style to all links inside for example the #contact div, the following selector would do:
#contact a {...}
squiwrl
05-24-2006, 01:34 PM
Thank you that was retardedly helpful :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.