Jump to content

css for a big site


Shilon

Recommended Posts

It depends, there isn't really any specific way.

 

If it's just a few styles that apply to a non-standard page you could leave them in the main stylesheet with clear comments inside /*...*/ tags that they are for a non-standard page perhaps grouped together at the bottom of the stylesheet, but they would have to have a different id or class. If you want to use the same id or class name for a non-standard page but with a different style, you must have it coded separately.

 

You should have a stylesheet which applies to most pages, assuming that your site has a consistent design, which it should.

 

Even then, it's often recommended to have a different stylesheet for a complicated menu or a form.

 

Then if only one page needs different styles, if it's only one or two items with the same style names as in the main stylesheet like #sidebar then you can put the styles in a head section style tag after the main stylesheet link to be processed last.

 

Make a different stylesheet if you have more than one non-standard page which can include only the different styles and put the stylesheet link just after the main stylesheet link to be processed last.

 

I hope that helps.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...