Welcome everyone!
I am facing an issue with a container that has two divs
and a parent element
with overflow height. The left div
has a fixed height: 200px
while the right div
is set to height: 100%
. However, the right div
does not expand to accommodate all the content. Can anyone suggest a solution?
I am using SCSS
for this. If there is an alternative approach to resolve this issue, please provide your suggestions.
.main{
display: flex;
background: #09f;
width: 100%;
max-height: 100px;
overflow-y: scroll;
}
.left{
background: #ef5523;
min-height: 200px; //height size for example
}
.right{
width: 100%;
height: 100%;
background: #99ff99;
}
<div class="main">
<div class="left">Left List</div>
<div class="right">Right List</div>
</div>