Why will overflow occur when padding is added?

Jul.14,2022
The padding-left and padding-right of the

inline element act on the visible width of the element


the display type of span is inline.
padding does not work for inline. You need to change the display type of span to inline-block.


because your word is written in span, span is an inline element, which is not valid for high and wide padding. You can set display:inline-block

.
Menu