and then set, this ID of the text-align: center;
As a result, he was disappointed.
In XHTML and CSS2.0, there is only one kind of inkjournal, in fact, his role is the same as the literal meaning, letting text, if set * {text-align: center;} or body {text-align: center;} That is all content in the webpage, including large forms and cells. This is well resolved, you can define this
Body {text-align: center;
P, TD, DIV {text-align: left;
In this way, you can. The table can be hit, but the content is still as left, and the settings such as IE are already enough, but for browsers such as Mozilla, body {text-align: center;} This setting is invalid, the interpretation of the box model of IE and Mozilla is different, resulting in different results.
We can join this property again
Body {
TEXT-ALIGN: CENTER;
Margin-left: auto;
Margin-Right: Auto;
}
In this way, the display is now in Mozilla, and this setting does not affect the normal display of IE.
In addition, for the setting of the CSS, or simplify the properties of the link A, the same settings do not have to be set in each ID in each ID, and some special Set. For example:
a {
Padding: 10px;
Display: block;
}
A: Hover {
Background: #eee;
Color: # 369;
}
If the attributes in the previous A, you need to write again in A: Hover ...
There is also a question that should be noted with Div CSS is that if you define a Div's width, then his actual width should be
Div's width = width padding left padding-rights border left border right
And if there is a Margin property, the space he occupies has to add Margin's value.