actually I saw many questions like this but I can't found normal answer of this question because that I open this question again.
When we have block element(display: block) this element contain full width of parent component if element itself root element this element width take 100%.
But when we look block element(display:block) but position absolute elements there are work like inline-block elements(work like block element but width not full of parent component) even parent element position relative.
Can anyone explain me why position absolute and fixed elements width not work like display: block elements.
https://jsfiddle.net/epbkmzh3/28/
<div class="container">
<div style="background: red;"> 1 </div>
</div>
<div class="container" style="position: relative;">
<div style="position: absolute; background: red;"> 1 </div>
</div>
See Question&Answers more detail:os