How to break the line by passing the size of the div?

Asked

Viewed 7,662 times

3

I have this problem rendering text without spacing.

How can I fix it?

inserir a descrição da imagem aqui

  • 2

    Post your code beyond the image, this will help identify the problem.

1 answer

9


I understood that there is no line break because there are no spaces. Use the property word-wrap and set the value break-word, this will force a line break as soon as the text reaches the limits of div.

Behold.

div {
    width: 200px;
    word-wrap: break-word;
}
<div>
   Note:InternetExplorer9andearlierversionsdonosupportWeb Workers.
</div>

inserir a descrição da imagem aqui

CSS3 word-wrap Property

Browser other questions tagged

You are not signed in. Login or sign up in order to post.