Messy Style sheet

liunx

Guest
Hi,

Is there a set way to go about structuring style sheets? ie links first then id's then classes etc.

My style sheets got a bit messy, is there anyway I can tidy it up?

Thanks for yuor helpI usually do default values, page layout, navigation, then everything else.

/* -- defaults -- */
body { margin:0; padding:0; }
p { padding-top:0; }
/* -- end defaults -- */

/* -- layout -- */
#shell { text-align:center; }
/* -- end layout -- */

/* -- navigation -- */
#nav { text-decoration:none; }
/* -- end navigation -- */

input.wideWidth { width:500px; }I don't think that matters too much, as long as you can easily find the stuff you need in it.

This is how I always do it:

<!-- m --><a class="postlink" href="http://sander.kryap.com/ids/includes/css.inc.cssIf">http://sander.kryap.com/ids/includes/css.inc.cssIf</a><!-- m --> some of the classes and ids only affect a few pages, there's nothing stopping you from putting them on seperate style sheets, and linking the second style sheet to those pages.
 
Back
Top