2

I have 3 div containers and I want first div container to be on left side and be as large in height as 2 containers on the right side, but the problem is that the containers on right side are not wrapped in one parent container. Basically what I want to do - html structure

Is it even possible to do it without changing html structure? Or only possible solution would be to wrap those 2 elements in one parent container?

Here is my html structure -

<div class="container">
  <div class="block1">text here</div>
  <div class="block2">text here</div>
  <div class="block3">text here</div>
</div>

Thank you for your help!

Paulie_D
  • 107,962
  • 13
  • 142
  • 161
Mee
  • 83
  • 1
  • 8

1 Answers1

1

i made with grid

.container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height:400px;
}

.container div {
  color:#fff;
  text-align:center;
}

.block1 {
  grid-row: 1 / 5;
  grid-column: 1 / 3;
  background:red;
}

.block2 {
  grid-row: 1 / 3;
  grid-column: 3 / 3;
  background:greenyellow;
}

.block3 {
 grid-row: 3 / 5;
  grid-column: 3 / 3;
  background:dodgerblue;
}
<div class="container">
  <div class="block1">text here 1</div>
  <div class="block2">text here 2</div>
  <div class="block3">text here3</div>
</div>
doğukan
  • 23,073
  • 13
  • 57
  • 69