# Flex keeps wrapping even after nowrap?

**URL:** <https://forum.freecodecamp.org/t/flex-keeps-wrapping-even-after-nowrap/446421>\
**Category:** Curriculum Help\
**Tags:** html, css\
**Created:** [February 15, 2021, 3:43pm UTC](https://forum.freecodecamp.org/t/flex-keeps-wrapping-even-after-nowrap/446421 "2021-02-15T15:43:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![javascriptcoding5678](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@javascriptcoding5678](https://forum.freecodecamp.org/u/javascriptcoding5678)\
**Post date:** [February 15, 2021, 3:43pm UTC](https://forum.freecodecamp.org/t/flex-keeps-wrapping-even-after-nowrap/446421/1 "2021-02-15T15:43:38Z")

</div>

The boxes keep morphing into each other, how do I prevent this?  
It keeps taking 3 images and combining them into 1.  
And I don’t want the boxes to get squished together.  
The boxes should stay the same size and not change.

code: [Edit fiddle - JSFiddle - Code Playground](https://jsfiddle.net/v7f1ohba/1/)

```auto
.outer {
  max-width: 940px;
  height: 348px;
  background-color: #000;
  margin: 0 auto;/* top+bottom left+right */
}

.centersvg {
  display: flex;
  flex-flow: nowrap;
  align-items: center;
  justify-content: space-around;
}
div {
  height: 348px;
  background: red;
}

.image1 {
  float: left;
  width: 280px;
  height: 280px;
  background: #13b4ff;

}

.image2 {
  float: left;
  width: 280px;
  height: 280px;
  background: #13b4ff;

}

.image3 {
  float: left;
  width: 280px;
  height: 280px;
  background: #13b4ff;

}

```

```auto
<div class="outer">

  <div class="centersvg">
    <div class="image1">
    </div>

    <div class="image2">
    </div>

    <div class="image3">
    </div>
  </div>
</div>

```

---

<div class="post-metadata">

**Author:** ![kevinSmith](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/kevinsmith/32/72934_2.png) [@kevinSmith](https://forum.freecodecamp.org/u/kevinSmith)\
**Post date:** [February 15, 2021, 3:50pm UTC](https://forum.freecodecamp.org/t/flex-keeps-wrapping-even-after-nowrap/446421/2 "2021-02-15T15:50:45Z")

</div>

```auto
flex-flow: nowrap;

```

Is that the right way to set that? The ‘flex-flow’ prop is the combining of `flex-direction` and `flex-wrap`. So, I would expect:

```auto
flex-flow: row nowrap;

```

or whatever. If you just want to set the wrap, then I’d expect

```auto
flex-wrap: nowrap;

```

unless I’m misunderstanding. [This](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) is a great reference, by the way.

---

<div class="post-metadata">

**Author:** ![javascriptcoding5678](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@javascriptcoding5678](https://forum.freecodecamp.org/u/javascriptcoding5678)\
**Post date:** [February 15, 2021, 6:25pm UTC](https://forum.freecodecamp.org/t/flex-keeps-wrapping-even-after-nowrap/446421/3 "2021-02-15T18:25:14Z")

</div>

I got it.  
code: [https://jsfiddle.net/h8g9ysa4/3/](https://jsfiddle.net/h8g9ysa4/3/)

```auto
.parent {
  display: flex;
  background-color: red;
  width: 940px;
  height: 348px;
  justify-content: space-around;
  align-items: center;
}

.child {
  flex: 0 0 280px;
  height: 280px;
  margin: 20px;
  background-color: blue;
}

```

```auto

<div class="parent">
<div class="child"></div>
    <div class="child"></div>
    <div class="child"></div>
    </div>

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [August 17, 2021, 6:25am UTC](https://forum.freecodecamp.org/t/flex-keeps-wrapping-even-after-nowrap/446421/4 "2021-08-17T06:25:59Z")

</div>

Closed on August 17, 2021, 6:25am UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
