I'm sure this has something to do with position:absolute
and that overriding the css display
property to block.
As you can see in the image below (and this fiddle) the div on the left (absolute) doesn't vertically center it's text but the one on the right does (it's relative). If seen in chrome debugger, the former has display:block
and the latter display:table-cell
.
Question: I know positioning something absolutely 'removes it from the flow of the document' but does that imply that it will NOT override display and everything will be defaulted to it's default display (i.e. block for divs, inline for spans etc.) Why? Is there a specific reason for this behavior?