-4

same like above example but in each container have text in middle and make responsive as well. anybody can help?

flexbox vertically split container in HALF

Kurt Iwa
  • 1
  • 1
  • Did you try it yourself atleast? Show us your work and we'll help you out from there. –  Dec 13 '17 at 09:04

1 Answers1

0

Here something that can give you a start:

.container {
  display: flex;
  width: 100%;
  justify-content: center;
  height: 15em;
}

.row {
  width: 50%;
}

.left {
  background: red;
}

.right {
  background: yellow;
}

.right div {
  height: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.right div:nth-of-type(1) {
  background: blue;
}
<div class="container">
  <div class="row left">
    
  </div>
  <div class="row right">
    <div>
      Top
    </div>
    <div>
      Bottom
    </div>
  </div>
</div>

Codepen: https://codepen.io/anon/pen/Wdbrrz

Zvezdas1989
  • 1,445
  • 2
  • 16
  • 34