3
Good point!
And as I found, most themes has suboptimized style.css file.
All theme developers should keep in mind that within CSS file, the order of tags is important. If you dont care about this, you may find the rendering is not as you expected. Also please note that within CSS file, same tag can be defined several times (as many as you like), and the latter will overwrite the former.
Example:
p td input {
font-size: 12px;
color: blue;
}
p {
background: #808080;
color: redl
}
when rendered, all p element (except that you have definitions for more concrete p elements (with class or id) will be rendered as red.
The general rule is following the html element tree, and the uplevel and general elements at the top, and class follows, and then id definitions.
The best practice:
1. the first definition should be always html, coz in the new standard, the parent of all the elements is html, not body. html can be viewed as canvas.
2. the second should be body element.
3. then general elements as div, p, td, input etc.
4. then specific definitions as
p.some
td.other
5. then comes id definitions as
div#content
I need reiterate one point:
please use all lower cases for elements (or tags as you like, though there are some different), which meands:
p instead of P
div instead of DIV
Seems i should post a normative css file as example. I'll do it a little later.