The content generated by the ::before pseudo-element is inline, so it flows along with the surrounding elements. If you want your generated content to be a block element (to enable you, for example, to style the pseudo-element’s width and/or height), add either display: block or display: inline-block to the pseudo-element’s declaration block.