Width

noun

say it: “WIDTH” /wɪdθ/

The CSS property that sets how wide an element is, in units such as px, rem or %. By default it sizes the content area, not the padding or border.

What does the width property do?

width sets how wide an element's content area is.

.product-card { width: 280px; }

In a sentence

  • “I set the width of the playlist panel to 320px so it looked like a phone screen.”

Level: Novice · More CSS terms at this level

Updated