I'm currently making a simple html page with two sections with content inside of each of them but the last content of the second div .right
is going on the bottom of the page and make the page scrollable.
I tried making another div and put a flex-direction: column
but it doesn't work:
body {
margin: 0;
}
.main-container {
display: flex;
flex-direction: column;
}
.left {
background: #ecece9;
width: 50%;
height: 100vh;
}
.right {
background: #ffffff;
width: 50%;
height: 100vh;
}
<div class="main-container">
<div class="left">
<h2>content</h2>
</div>
<div class="right">
<h2>content should be on top</h2>
</div>
</div>
How can I put two <div>
that has the same width and height next to each other without having to scroll?