Just create a series of different CSS classes and then use them as you want on the pages that need different styles. As a basic example, if you had this in your CSS file that was shared across two pages:
h1.page1 {
font-size: 14px;
}
h1.page2 {
font-size: 12px;
}
On page 1, you would do something like this:
<h1 class="page1">A heading on page1</h1>
And, on page 2, like this:
<h1 class="page2">A heading on page2</h1>
Page 1's H1 would be in 14px, Page 2 would be in 12.
An external style sheet will only affect the pages that call it. Simply placing a style sheet on your server will not automatically cause it to work with your pages.
One simple approach is to have different style sheets for different pages. For example, you might have a file main.css for most of your pages and a file photo.css for photography page.
Even when you have called an external stylesheet you can still redefine the CSS rules for specific elements by calling another external style sheet afterward. Another option is to rewrite some of the CSS rules within your file.
The other approaches described above will work too. It is handy to have all of your CSS rules organized in a small number of files.
Bookmarks