I have a problem with relative alignment of the position of the div.
I want the second div to be fixed in position, even if I delete the first div. The problem is that the second div adjusts its position when the first div is deleted.
My question is how to keep the position of the second div even if I delete the first div? Thanks:)
This code:
<div style="border: 1px solid red;width:400px;height:150px;margin:0px auto;" > <div style="border: 1px solid red; position: relative; width: 262px; height: 20px; top: 20px; left: 20px;">div-1</div> <div style="border: 1px solid red; position: relative; width: 262px; height: 20px; top: 60px; left: 20px;">div-2</div> </div>
It will display:

Then, if the first div is deleted, the second div will change its position. This code:
<div style="border: 1px solid red;width:400px;height:150px;margin:0px auto;" > <div style="border: 1px solid red; position: relative; width: 262px; height: 20px; top: 60px; left: 20px;">div-2</div> </div>
It will display: 
source share