Search code examples
cssword-wrap

Cut long text even without spaces


Is it possible to get a new line when a text is too long, not only on space but on every character?

Example: http://jsbin.com/yaxeyeko/1/edit


Solution

  • Something like this. Hope i have understood correctly

    FIDDLE

    div {
      width: 20px;
      background: red;
      word-wrap: break-word;
    }
    

    OR FIDDLE

    div {
      width: 20px;
      background: red;
      word-break:break-all;
    }