New! My 44-page ebook "CSS in 44 minutes" is out! 😃

Get it now →

#width

Defines the width of the element.

default width: auto;

The element will automatically adjust its width to allow its content to be displayed correctly.

width: 240px;

You can use numeric values like pixels, (r)em, percentages...

width: 50%;

If you use percentages, the value is relative to the container's width.