CSS auto value
The auto value has several uses. It's the default value for a lot of box model properties, including width
and height
. It means that if you don't explicitly specify width and height values, the browser will automatically calculate them.
For example, the content area of the <h1>
element doesn't extend past its content. But if we add more text, the area is recalculated. If we decided to make the text even longer, the content area would fill the width of the page and would be as tall as necessary to contain all the text.