# CSS: “flex-wrap”: “no-wrap” is not a “flex-wrap” value.

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

The correct value is `nowrap` (without a hyphen), not `no-wrap`.

The `flex-wrap` CSS property controls whether flex items are forced onto a single line or can wrap onto multiple lines. It accepts three values: `nowrap` (the default), `wrap`, and `wrap-reverse`. A common mistake is writing `no-wrap` with a hyphen, likely because the `white-space` CSS property uses `nowrap` and `no-wrap` interchangeably in some contexts, or simply because it looks more natural in English. However, for `flex-wrap`, only the unhyphenated `nowrap` is valid.

## HTML Example With the Issue

```html
<div style="display: flex; flex-wrap: no-wrap;">
  <p>Item 1</p>
  <p>Item 2</p>
</div>
```

## Fixed HTML Example

```html
<div style="display: flex; flex-wrap: nowrap;">
  <p>Item 1</p>
  <p>Item 2</p>
</div>
```
