Long words flow out of the box - How to prevent?

I have a div style where I need to add long text. I have a maximum width ( 100px ) and I need to "change text". Now I can’t find a solution for my problem: in the case of long text, it goes out of the box. I have no problem with height, so it should have the required size.

This is my code:

 <style> .infobox { -moz-background-clip: padding; -webkit-background-clip: padding; background-clip: padding-box; border: 6px solid rgba(0,0,0,0.3); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; padding: 30px; width: 100px; text-align: center; top: 100px; left: 200px; } </style> <div class="infobox"> LOOOOOOOOOOOOOOOOOOOOOOOOOOOONG TEXT :)</div> 
+6
source share
1 answer
+12
source

Source: https://habr.com/ru/post/902326/


All Articles