I am trying to create a layout with right and left divisions where the size of the left division matches the height of the browser window (100vh).
The left division consists of two sub-divisions that need to have variable sizes but collectively match the size of the left division. Additionally, the scroll bar at the bottom should always align with the bottom of the browser window as shown in this example:
https://i.sstatic.net/nUVhX.png
I am facing difficulty in achieving this layout for the left division.
Here is a Fiddle link: https://jsfiddle.net/bb61c412/67/
Below is the code snippet:
#left-div {
margin-left: 0px;
padding-right: 0px;
padding-left: 0px;
height: 100vh;
background-color: white;
}
#right-div {
margin-left: 0px;
padding-right: 0px;
padding-left: 0px;
height: 100vh;
background-color: gray;
}
#scroll{
padding-right:0px;
padding-left:0px;
background-color:#FAFAFA;
overflow-y:scroll;
height:70vh;
}
<link rel="stylesheet" type="text/css" href="https://bootswatch.com/bower_components/bootstrap/dist/css/bootstrap.min.css" />
<div class="col-sm-7" id='left-div'>
<div style="background-color:#FAFAFA;width:100%;height:100%;">
<div style="height:100px;background-color:white">
</div>
<div id="scroll">
<p>
"Sed ut...."
</p>
</div>
</div>
</div>
<div class="col-sm-5" id='right-div'>
</div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>