A Pen by Anton Koning

Thumbnail
This awesome code was written by antonkoning, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright antonkoning ©
  • HTML
  • CSS
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>A Pen by  Anton Koning</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  
<div class="wrapper">
  <div class="items-col">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
  </div>
  <div class="items-col">
    <div class="item-2x2">5</div>
  </div>
</div>
  
  

</body>

</html>

/*Downloaded from https://www.codeseek.co/antonkoning/a-pen-by-anton-koning-xYeaYP */
.wrapper {
  width: 100%;
  height: 100%;
  background-color: yellow;
  display: flex;
  flex-flow: row wrap;
  align-content: flex-start;
}

.items-col {
  display: flex;
  flex-flow: row wrap;
  width: calc(100%/2);
  height: 100%;
}

.item,
.item-2x2 {
  text-align: center;
  color: white;
  background: blue;
}

.item {
  flex: 1 calc(50% - 20px);
  height: 200px;
}

.item-2x2 {
  width: 100%;
  height: 400px;
  margin-left: auto;
}

Comments