CSS or what? Forcing the text split into multiple lines

As already stated in the accepted answer use the following:

word-break:break-all;

The W3 specification that talks about these seem to suggest that word-break: break-all is for requiring a particular behaviour with CJK (Chinese, Japanese, and Korean) text, whereas word-wrap: break-word is the more general, non-CJK-aware, behaviour. (credit: AakashM: see post)

Word-Break Property options (W3Schools):

normal      Default value. Break words according to their usual rules

break-all   Lines may break between any two letters

keep-all    Breaks are prohibited between pairs of letters

initial     Sets this property to its default value. Read about initial

inherit     Inherits this property from its parent element. Read about

Working Example:

Word-Break W3Schools


make a smaller div and use CSS text-align: justify and word-break:break-all;

Is this what you want?


Applying word-break: break-all; will make the text wrap at whatever character whenever it exceeds it's parent's width, without the need of a space or other type breakpoint.

Tags:

Html

Css

Styling