IamNOOB IamNOOB - 8 days ago 6
HTML Question

How to break a line after some certain width in css

I am designing a chat ui.

In my chat bubble when i enter a lot of characters it goes outside the bubble.

Are there any css techniques to break a line after certain width ?

Answer

p{
  width: 100px;
  border: 1px solid #111;
  word-break: break-all;
}
<p>some random text jfkdfjkd jkfdkf</p>

Comments