Name

width

Values:

length|percentage|auto

Example:

IMG.photo { width: 75% }

Applies to:

Block-level elements and replaced elements (such as graphics)

Inherited:

Yes

This property sets the width of the element. It can be applied to text elements or as a way to resize images.

Get Web Design in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.