I have this three divs and i'm facing a problem. There's a way to position divs with flex layout down each other when having different heights?
My .div-1
and .div-3
have the same width
, there's a way to put the .div-3
instantly down the .div-1
?
This is my code:
.container {
display: flex;
flex-wrap: wrap;
}
.div1 {
width: 80%;
background-color: gray;
height: 40px;
}
.div2 {
width: 20%;
background-color: indigo;
height: 120px;
}
.div3 {
width: 80%;
background-color: red;
display: grid;
float: left;
}
<!DOCTYPE html>
<html>
<body>
<div class="container">
<div class="div1">
content div 1
</div>
<div class="div2">
content div 2
</div>
<div class="div3">
content div 3
</div>
</div>
</body>
</html>
How i can do this?