I want to set different margins to two divs, inside another div. The first div should appear top of the second div.
<div style="position:relative">
<div style="position: absolute;margin-top:24px">
This should be appar top of the second div.
</div>
<div style="margin-top:24px">
second div
</div>
</div
I used above mention code, but first div also getting margin 50
, not margin 24
.
How to resolve this issue?
Cannot use position:absoulte
to the second div.