The overflow-wrap property defines whether or not to break lines with long words if they overflow the container.
overflow-wrap: normal | break-word;
break-word
.mydiv {
border: 1px solid red;
max-width: 300px;
overflow-wrap: break-word;
}
normal
.mydiv {
border: 1px solid red;
max-width: 300px;
overflow-wrap: normal;
}
normal: words with no spaces will not break. (default value)
break-word: words with no spaces will break as soon as they reach the end of the box.