That is not entirely correct (although it works as a simple rule-of-thumb).
There is no way to specify that a CSS property should have its initial value (what you referred to as the predefined value). If you omit the declaration altogether the computed value will be the initial value, unless the property is inherited. But you can’t say ‘use the initial value whatever that is’.
The way to think about the auto value is that it means that the computed value will be inferred automatically using some other properties.
it doesn’t mean that the left margin gets its initial value (0), but that it is computed from other values. In this case, subtracting the specified width (40em) and the right margin (2em) from the width of the containing block will yield the actual left margin.
Through out my expirience in Web Design,
I believe I have learned that what auto and inherit mean.
The majority of CSS elements have a predefined value already. auto means keep that predefined value.
Inherit means take the value that the element is passed by a parent element; for example, if you have the background of all div’s to be #ff0000;
but for one div named blue you want it to have a background of blue;
If you did div#blue{background:inhierit;}
then it would inherit the red colour because all divs are set to have the background of #ff0000;
Aside from setting automatic horizontal margins to centre a block-level element, as Ryan mentioned, these values are most often used to ‘undo’ a generic rule for a specific element.
For instance, let’s say we want to use Helvetica for all H2 headings, except those in the sidebar which should have the same font as the rest of the text. Now, we could do it like this,
I use “auto” from time to time to set an element back to its “natural” width or height when I’ve fiddled with those for animation and the current value is for some reason not correct. I would explain further, but that falls outside the scope of this thread