CSS CSS Flexbox Layout Flexbox Properties Wrapping Items and Distributing Space

Nahom Micheal
Nahom Micheal
3,364 Points

multi-line flex container

how to create multi-line flex container? how to give .row the flexbox property a value that will make it a multi-line flex container?

style.css
/* Complete the challenge by writing CSS below */
.row{
  display:flex;
  flex-flow:column;

}
index.html
<!DOCTYPE html>
<html>
<head>
  <title>Flexbox Layout</title>
  <link href='https://fonts.googleapis.com/css?family=Varela+Round' rel='stylesheet' type='text/css'>
  <link rel="stylesheet" href="page.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <div class="row">
    <div class="item">Item 1</div>
    <div class="item">Item 2</div>
    <div class="item">Item 3</div>
    <div class="item">Item 4</div>
    <div class="item">Item 5</div>
    <div class="item">Item 6</div>
  </div>
</body>
</html>

3 Answers

For that challenge it will not accept the flex-flow property. Only use

.row {
     display: flex;
     flex-wrap: wrap;
}

Nevertheless, that shorthand property is acceptable in application.

Michael Watson
Michael Watson
13,204 Points

Wouldn't a multi-line flex container use "column"? I thought this was a bug. "Wrap" is only multi-line if the viewing size changes, so on it's own it's a single line.

and remember the value wrap breaks the flex items into multiple lines