# CSS: too few values for the property “width”

> Canonical HTML version: https://rocketvalidator.com/html-validation/css-too-few-values-for-the-property-width
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

A `width` media feature in a media query, or its `min-width` or `max-width` form, has a value the validator can't read as a length.

Media queries test the viewport's width with the `width` feature, usually through its range forms `min-width` and `max-width`. Those prefixes belong to the same feature, which is why the message says `width` when the stylesheet says `min-width`. The value has to be a single length, such as `48em` or `768px`.

Most of the time the culprit is an old hack aimed at Internet Explorer: `@media screen and (min-width: 0\0)`. Every other browser skips a query with a `\0` escape after the number. Internet Explorer didn't, so it was the only browser to apply the rules inside. The validator can't parse `0\0` as a length and reports too few values. The `\9` escape, as in `0\9`, and an escape after a unit, as in `768px\0`, give the same message plus an `Unknown dimension` error.

Microsoft retired Internet Explorer in 2022, and current browsers never apply the rules inside these blocks, so in most cases you can delete them. Move the rules out of the media query if every browser needs them. If you meant a real breakpoint, drop the escape and write the length on its own, as in `(min-width: 768px)`.

## Invalid example

```html
<style>
  .search-box {
    padding-right: 1em;
  }

  @media screen and (min-width: 0\0) {
    .search-box {
      padding-right: 2em;
    }
  }
</style>
```

## Valid example

```html
<style>
  .search-box {
    padding-right: 1em;
  }
</style>
```
