Search code examples
htmlcsswidth

Word-break: break-all; - what's to replace with?


I have this:

 <div style="word-break: break-all; width 50px;">... long text ...</div>

It works just as I'd like to

But the editor says:

 CSS validation: 'word-break' is not  avalid CSS property name.

What should I use instead?


Solution

  • word-break is valid indeed, but only in CSS3. Are you sure that your validator is set to CSS3 rather than CSS2 or lower?