I want to set the position to a div depending on its own height which can be different depending on the content.
This is the structure:
HTML
<div class="wrapper">
Content
</div>
CSS:
:root {
--height: x;
}
.wrappper {
height: auto;
top: calc(100vh - var(--height));
}
.clientHeightgives you height of the object. I'm just assigning that to the CSS variable.