Margin is also effective at centering objects. Various browsers do not support the same properties the exact same way. For example, Internet Explorer does not center wrapping elements the same way Firefox or Google Chrome does. To center a wrapping div, you must use the CSS property: "margin: 0px auto;" When using two values for a margin property, the first value represents the top and bottom margin, while the second value represents the left and right margins. Using the value "auto" is possible, but only when the parent's respective width or height values are set. In this case, the respective value is set by the browser's native CSS values. However, in this case using "auto" for the top and bottom would not work because the body's height property is not set.
Spacing is important because it provides clarity to your page, and allows you to work effectively to put content in the place that your viewers most likely read.
-Cole Turner.
No comments:
Post a Comment