0 votes
1 view
in Web Technology by (40.4k points)

Okay, this is really confusing me. I have some content inside of a div like so:

<div style="background-color: green; width: 200px; height: 300px;">

Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest.

</div>

However, the content overflows the DIV (as expected) because the 'word' is too long.

How can I force the browser to 'break' the word where necessary to fit all of the content inside?

1 Answer

0 votes
by (40.4k points)

Try using word-break as follows:

[word-break: break-word;]

Welcome to Intellipaat Community. Get your technical queries answered by top developers !


Categories

...