>On Tue, Jun 17, 2008 at 9:04 AM, Holly Bergevin <[EMAIL PROTECTED]>
>wrote:

>> The reason you're seeing the problem on some pages and not others is that
>> you have style sheets on each page, and there are different values for some
>> things, depending on the page being viewed.

>> Do you really want to maintain a style
>> sheet for each page?

From: "Stuart King" <[EMAIL PROTECTED]>

>Style sheets - This is a problem I am struggling with. What do you do when
>different pages have slightly different layouts and positioning? Do you have
>one style sheets that you maintain externally or several? Are there any
>articles on this or do you have some insight?

Stuart,

Uniquily identifying each page by using an ID attribute in the opening body 
tag, will allow you to write selectors for individual pages that require slight 
differences, without requiring separate style sheets for each page.

Your individual pages are identified in the HTML:
< body id="about" >
< body id="wines" > 
etc. for the individual pages.

Then in your style sheet you can write:

#about p {margin: 0 0 12px;}
#wines p {margin: 0;}

and so on, for any element that needs some different styling for only a single 
page. If it's needed on more than one page, you'd write something like:

#about #left_center, 
#wines #left_center {top: 99px;}

to target more than one page with the same change.

This way, you can have one basic external style sheet (as opposed to embedded 
style sheets on each page as you have now) that will have styles covering most 
things, with a few special selectors that target only the things that need to 
be different on one page, but not another.

~holly 
 
                   
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to