I store all styles directly in tags at the very top of my stylesheet. The following are any common CSS classes.
After that, the main structure, usually global. it’s usually easier for me to choose, for example, to retreat:
#container { width: 600px; ... }
This has the advantage of providing a kind of indentation, and you can very easily see the page structure from CSS. Sometimes you will have to rename your style rule, this is the structure of the page changes, but it does not really matter. This style works best when all your rules are on the same line.
I change things a bit when it comes to some of the contents of my stylesheet, and just go down from my contents div.
#content h2 { ... }
Finally, I end up with style rules for specific pages. I found that it makes sense to give the boy an identifier based on the file name or URI, and the body is the class of the current file directory. This makes it easy to orient style rules in the main CSS to a specific page or group of pages, if necessary. (Obviously, you should weigh this against including a new stylesheet.)
Inside style rule declarations, I keep all my rules well-ordered based on display attributes, position, size, margin, border, indentation, background, color, text attributes, line attributes, word attributes, font attributes. Conceptually going from the outside to the inside (you can argue that the font refers to the attributes of the text. As long as you are compatible, that’s all that matters).
I use the abbreviation for fields (ex margin and border), because I have to remember them (top, right, bottom, left) by TRouBLe. I avoid using abbreviations for background and fonts because they are a little more difficult to remember.
For example:
.rule { display: block; visibility; visible; position: relative; float: left; z-index: 1; top: 3px; left: 10em; width: 100px; height 30px; overflow: hidden; margin: 1px 3px 5px 1px; border:3px dotted #ff0; padding: 5px; background-color: #f0f; background-image: url(/foo/bar); color: #000; text-align: left; text-decoration: none; line-height: 3px; word-spacing: 2px; letter-spacing: 1px; font-family: sans-serif; font-weight: bold; }