CSS ::before pseudo-element line-height?
My paragraph has a height/line-height of 50px and
text-align: center, which centers the text. But p:before is causing it to increase in height/line-height, causing the text to bump down. I want both p and p:before to be vertically centered.
The text length varies so I don’t think i can just use
position: absolute for the icon…
The reason this occurs, is because
line-height is being inherited by the
:before elements, which is also an
You could solve this by floating the
:before content, thus removing it from the flow, rendering it unaffected by the