Flexbox example in CSS

<!DOCTYPE html>
<html>
<head>
  <link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Responsive Flexbox</h1>

<div class="flex-container">
  <div class="flex-item-left"><img src="images/1.jpg"></div>
  <div class="flex-item-left"><img src="images/1.jpg"></div>
  <div class="flex-item-left"><img src="images/1.jpg"></div>
  <div class="flex-item-left"><img src="images/1.jpg"></div>
</div>

</div>

</body>
</html>


* {
  box-sizing: border-box;
}
.flex-container 
{
  display: flex;
  flex-direction: row;
  font-size: 30px;
  text-align: center;
}
.flex-item-left {
  background-color: white;
  padding: 10px;
  flex: 50%;
}
.flex-item-right {
  background-color: gray;
  padding: 10px;
  flex: 50%;
}



@media (max-width: 800px) {
  .flex-container {
    flex-direction: column;
  }
}