Forum Moderators: not2easy
You can assign different classes for the headings on the pages like:
<h2 class="small"> or <h2 class="bigger">
Then you just modify the css: h2.small {font-size: 16px;}
Or you can assign different classes or ID's to the pages themselves like:
<body id="page1> or <body id="page2">
The css in that case would be something like that:
#page1 h2 { font-size: 16px; }
#page2 h2 { font-size: 20px; }
And so on.
Well, if I put the <h2> class in the same ss (style-sheet) as the declared <h2>, the browser seems to pick up my original and use it. If I put it into another ss, I have to have an alternative ss for my first ss - if you follow me. In other words, unless I remove my original <h2> completely, the browser will use it.
The risk of many stylesheets is that it will become confusing for anyone who takes over from me.
What about declaring it on the page itself, do you think? And if that might work better, I suppose that declaration would go in the <head> section.
If the browser reads it AFTER the style-sheets, perhaps it would accept that one as the version I want.
Your rules should look something like this:
h2 { font-size: 20px } /* This is your default */
#page1 h2 { font-size: 20px; } /* Could ommit this since it matches the default */
#page2 h2 { font-size: 16px; } /* Override the default */
> If I put it into another ss, I have to have an alternative ss for my first ss - if you follow me. In other words, unless I remove my original <h2> completely, the browser will use it.
With the example above, that should not be the case (assuming you remember to give your body id values "page1" and "page2").
> What about declaring it on the page itself, do you think? And if that might work better, I suppose that declaration would go in the <head> section.
There's no need. It should work in the same stylesheet.
Hope this helps.
-Peter