Case 1: No Value is Auto


Case 1: No Value is "Auto"

When none of width, margin-left, or margin-right is set to auto, the right margin is ignored and treated as if it had been set to auto; that is, it is the value calculated automatically using the formula shown in Figure 8.17.

For example, if there is a P inside a BODY, and the style sheet reads

 BODY {   width: 30em } P {   width: 25em;   margin-left: 3em;   margin-right: 3em }

the P will be 25em wide and have a 3em margin on the left, but the right margin will be ignored and will be calculated as 30 25 3 = 2em (assuming no paddings and borders are set elsewhere).



Cascading Style Sheets(c) Designing for the Web
Cascading Style Sheets: Designing for the Web (3rd Edition)
ISBN: 0321193121
EAN: 2147483647
Year: 2003
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net