# CSS: “min-width”: X is not a “min-width” value.

> Canonical HTML version: https://rocketvalidator.com/html-validation/css-min-width-x-is-not-a-min-width-value
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

The CSS `min-width` property has a quoted string as its value, such as `""` or `"200px"`, and strings are not valid for this property.

`min-width` accepts a length (`200px`, `12rem`), a percentage (`50%`), `0`, a `calc()` expression, the keywords `auto`, `min-content`, `max-content` and `fit-content`, and CSS-wide keywords like `inherit`. Anything wrapped in quotes is a CSS string, so `min-width: "200px"` is rejected even though `min-width: 200px` is fine. The validator repeats the string in the message: `“""”` means the declaration was `min-width: ""`, an empty string.

An empty string usually comes from a template or page builder that wraps the value in quotes and prints nothing when the setting is blank. Quoted lengths often come from code copied out of JavaScript or JSON, where values are written as strings (`minWidth: "200px"`).

To fix it, remove the quotes. If there is no value to set, remove the whole declaration; the default `min-width` is `auto`. Other bad values produce different messages: a number without a unit (`min-width: 200`) reports that only `0` can be unitless, and an unknown keyword (`min-width: none`) reports that values are not recognized.

## Invalid example

```html
<style>
  .sidebar {
    min-width: "";
  }

  .card {
    min-width: "200px";
  }
</style>
```

## Valid example

```html
<style>
  .card {
    min-width: 200px;
  }
</style>
```

The empty declaration on `.sidebar` is gone, and the `.card` value has no quotes.
