Can anyone help me with this code snippet?
<div style="position: relative;">
/***main***/
<div style="top:0">
/*****Content1****/
</div>
<div>
/*****Content2****/
</div>
<div>
/*****Content2****/
</div>
<div style="bottom:0">
/*****Content4****/
</div>
</div>
I am struggling to make Content1 always stay at the top and Content4 always stay at the bottom. Additionally, I want Content2 and Content3 to adjust their top and bottom margins equally so that they look evenly spaced. The issue is that the parent div has a variable height and all other divs have fixed heights.
If you need a visual reference of what I'm trying to achieve, please refer to this image:
Your assistance would be greatly appreciated,