I have 2 div divA and divB inside a main div,
divA is at top, and like a title stay top, he has a fixed height. divB is the content, and should occupy all the space left until the bottom.
divA had a size in pixel. divB should do 100% of height - divA size
#container{
width:400px;
height:800px;
background-color:red;
position:relative;
overflow: scroll;
}
#options{
width:95%;
height:30px;
background: #734A6F;
position: relative;
color: #FFF;
line-height: 33px;
padding-left: 10px;
}
#buttons{
position:absolute;
width:95%;
height:100%;
background-color:blue;
}
<div id="container">
<div id="options">
</div>
<div id="buttons">
</div>
</div>
I do not want to hide the scroll so please no scroll:hidden
in my case there is stuff inside the blue div, so it will be cut in half with scroll hidden. the only way to make it work correctly would be the blue div to fit