Case 2: One Value is Auto


Case 2: One Value is "Auto"

When only one value is set to auto, that value is the one calculated automatically using the previous formula. That is, that value will be maximized made as large as possible.

Here is the previous example, which is now slightly modified:

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

Now, the right margin will indeed be 3em and the left margin will be calculated (2em).



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