I've been searching for a solution to this issue, but nothing seems to be working. I want the inner div to be positioned at the bottom of the outer div, with a 5px margin separating them. However, using absolute positioning disrupts the width and centering of the elements. Is there a way to achieve this layout without compromising these styles?
Below is my code snippet:
var height = $('.windows').height()*0.85;
$('.windows-content').css('height', height);
.windows {
max-width: 900px;
width: 70%;
min-height: 300px;
height: auto;
box-shadow: -1px -1px 0px 0px #000 inset, 1px 1px 0px 0px #FFF inset, -2px -2px 0px 0px #868A8E inset;
background-color: #C2C5CA;
margin: 0 auto;
}
.windows-content {
width: 98.5%;
height: auto;
box-shadow: 2px 2px 0px 0px #000 inset, -1px -1px 0px 0px #FFF inset;
background-color: #FFF;
margin: auto;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js"></script>
<div class="windows" id="home-window">
<div class="windows-content"></div>
</div>