While using the property
display: inline-block
will wrap the element to prevent the text inside from extending beyond its parent.