Els wrote:
Wintersrush wrote:
I am working on a website that is using a Cascading Style Sheet. I've
created the primary webpages and .css page. The format is the same
throughout the entire website EXCEPT the color of the headings and
hyperlinks.
I need to make each site have a different color of those items. How do
I make the changes to each page, but keep the same .CSS?
Any feedback would be GREATLY appreciated!
By giving each page a different id or class.
[details snipped] Obviously these styles aren't complete, but you get the idea.
This is too complicated and ignores the cascading of style sheets.
Put what is common to all pages in the .css file. Then, in the
HEAD section of each page, first put the link to that .css file and
then have a local style sheet. It should look like this:
<LINK REL=STYLESHEET TYPE="text/css" HREF="genl_styl e.css" >
<style TYPE="text/css">
<!--
[local style declarations go here]
-->
</style>
If anything in the local declarations conflict with the contents of
genl_style.css, the local declarations will prevail. Thus, you get
a cascade. For a summary of the cascade concept, see my
<URL:http://www.rossde.com/internet/Webdevelopers.h tml#css>.
Note: Today, the comment brackets <!-- and --> are often omitted
because the newer browsers all recognize style sheets. I still use
them so that my pages can still be viewed with older browsers.
--
David E. Ross
<URL:http://www.rossde.com/>
I use Mozilla as my Web browser because I want a browser that
complies with Web standards. See <URL:http://www.mozilla.org/>.