I'm facing an issue where I am trying to place a div at the bottom of the viewport but it's not working as expected. Here is how my current setup looks like:
html
<div class="parent">
<div class="bottom">
</div>
</div>
css
.bottom{
position:absolute;
bottom:0;
}
The problem arises because the height of the parent div is determined by JavaScript and some styles are added dynamically like
<div class="parent" style="height: 483px;">
, so the div doesn't appear at the bottom until the screen is resized. Is there a way to dynamically adjust the screen size and apply CSS to ensure that the div stays at the bottom?