#x {
background: red;
height: 100px;
}
#y {
background: blue;
height: 100px;
position: absolute;
}
<div id="x">div 1</div>
<div id="y">div 2</div>
position: absolute;
On the div is making it behave like an inline element. Remove the property and we see that the div behaves like it should, a block element.
My question - Does just adding a position: absolute to a block element make it behave like an inline?