Advaith Advaith - 1 month ago 21
HTML Question

Overflow prob in css

While i was making a website i had a problem of text overflow.

This is the code



div {
width: 100px;
background: blue;
}

<div>sssssssssssssssssssssssssssssssssssssssss</div>





The
ssssss
is overflowing in the div i want them on the next line without typing
<br>
.

I dont know how to apply
display: flex;
.
Please give me some code for making the
sss
only stand inside the
div

Answer

Use word-break: break-all;

div {
  width: 100px;
  background: blue;
  word-break: break-all;
}
<div>sssssssssssssssssssssssssssssssssssssssss</div>

Comments