PDA

View Full Version : Quick css question


kearnsy
02-24-2010, 11:47 AM
Say for instance you have a 5 page site, index, contact, about, services, products.

If you only use one style sheet, what happens when you attatch that style sheet to the other pages and change the properties? will it change the properties of the other pages?

gentleone
02-24-2010, 12:24 PM
Yes, as long as you link from all those pages to this stylesheet.

Corrosive
02-24-2010, 12:45 PM
You need consistency in web designs in my opinion. A stock set of layout styles should service all pages on a site.

kearnsy
02-24-2010, 02:25 PM
Sorry guys, what i meant to say was, if i use one style sheet for all of my pages, say for instance it's called style.css, when i make changes to say the about page with the style.css, will it also change the look of my other pages that have the style.css attached to it?

What i don't want, is for me to make changes to one page and it affects the other pages as well.

This is just for experimental purposes really

Thanks

Corrosive
02-24-2010, 03:54 PM
If the stylesheet is linked it will change the styles on every page it is linked to. That is kind of the point of CSS. Sitewide style changes from one file.

domedia
02-25-2010, 02:54 PM
Sorry guys, what i meant to say was, if i use one style sheet for all of my pages, say for instance it's called style.css, when i make changes to say the about page with the style.css, will it also change the look of my other pages that have the style.css attached to it? Yes, if you want to.

What i don't want, is for me to make changes to one page and it affects the other pages as well. If you don't want it that way, then just write your HTML/CSS accordingly :-)

DWcourse
02-25-2010, 03:28 PM
You need one style sheet that provides styling for all the major elements of your pages. You can customize styles on a page-by-page basis by creating custom classes and applying them as needed. Or by giving the body tag of each page a unique id and referencing that as part of the style selector for items that apply only to that page.

kearnsy
02-25-2010, 04:14 PM
Ok cheers guys, that's cleared things up for me now.

I just wanted to know what happens to the individual pages that hace the same style sheet applied

DWcourse
02-25-2010, 11:45 PM
BTW, there is really no such thing as a "Quick CSS question" :)