Role of CSS flex-wrap property no-wrap value

Use the flex-wrap property with nowrap value to avoid flex-items to wrap.


You can try to run the following code to implement the nowrap value −

Live Demo

<!DOCTYPE html>
         .mycontainer {
            display: flex;
            background-color: orange;
            flex-wrap: nowrap;
         .mycontainer > div {
            background-color: white;
            text-align: center;
            line-height: 40px;
            font-size: 25px;
            width: 100px;
            margin: 5px;
      <div class = "mycontainer">