CSS Layout How to - webkit-flex-flow: row wrap;








Question

We would like to know how to webkit-flex-flow: row wrap;.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.container {<!-- w w  w  .  j  a  va  2  s.c o  m-->
  max-width: 1200px;
  min-width: 270px;
  display: -webkit-flex;
  -webkit-flex-flow: row wrap;
  margin: 0 auto;
}

.container>* {
  min-height: 100px;
  -webkit-flex: 1 1 auto;
}

.logo {
  -webkit-flex: 0 1 500px;
}

.header {
  width: 100%;
}

.left {
  -webkit-flex: 0 1 200px;
}

.middle {
  min-width: 300px;
}

.right {
  -webkit-flex: 0 1 155px;
}

.logo {
  background: blue;
}

.header {
  background: red;
}

.left {
  background: yellow;
}

.middle {
  background: green;
}

.right {
  background: blue;
}
</style>
</head>
<body>
  <div class="container">
    <div class="logo">logo</div>
    <div class="header">header</div>
    <div class="left">left</div>
    <div class="middle">middle</div>
    <div class="right">right</div>
  </div>
</body>
</html>

The code above is rendered as follows: