Skip to main content

HTML Guide

Free site validation

Find out what web pages on your sites are affected by HTML issues.

CSS: “width”: Too many values or values are not recognized.

The value specified for a width attribute in CSS is not valid.

The width CSS property sets an element’s width. There are many allowed values for this attribute, for example:

/* <length> values */
width: 300px;
width: 25em;

/* <percentage> value */
width: 75%;

/* Keyword values */
width: max-content;
width: min-content;
width: fit-content(20em);
width: auto;

/* Global values */
width: inherit;
width: initial;
width: revert;
width: unset;

Learn more:

Related W3C validator issues