I think you can find all the necessary information here .
Just quote the relevant parts:
When an inline box contains a block level block in a stream, an inline block (and its inline ancestors in the same row field) splits around a block level block (and all block level bracelets that are sequential or separated only by resettable spaces and / or elements outside flow), breaking the built-in block into two fields (even if both sides are empty), one on each side of the block (s) of the level block. The row boxes before and after the break are enclosed in anonymous block blocks, and the block level block becomes the native of these anonymous boxes. When such an inline field affects relative positioning, any resulting translation also affects the block level contained in the inline field.
So, for example, if you add inline content to your wrapper (for example, this is jsfiddle ), then the width of this wrapper will be the width for the inline content.
source share