I have a bootstrap container with some content center screen. The amount of content in this container may vary. However, I need it to be at least the height of the aside sidebar.
The aside sidebar, with a fixed width, is positioned absolute (Out of the flow of the document) as setting it to position relative caused the container to end up half way down the screen, after the sidebar.
I tried JQuery/Javascript methods to get the height of the aside sidebar onload and set the section tag or container to be of equal height, but this doesn't seem to get the calculation and set the height.
/* CSS */
section {float: left; border: 1px solid blue;}
.container {margin: auto; width:60%; background: pink}
aside {position: absolute; top:0;left:0;}
<!-- HTML -->
<section>
<aside id="aside">
<ul>
<li>LINK</li>
<li>LINK</li>
<li>LINK</li>
<li>LINK</li>
<li>LINK</li>
<li>LINK</li>
</ul>
</aside>
<div class="container" id="container">
This container or the wrapping section tag needs to be at least the hight of the aside
</div>
</section>
var left=document.getElementById('aside').style.height;
var right=document.getElementById('container').style.height;
if(left>right)
{
document.getElementById('container').style.height=left;
}
else
{
document.getElementById('aside').style.height=right;
}