Monday, 2 March 2015

Force a Line Break in a Loooooong Word in a DIV?

This could be added to accepted answer for 'cross-broswer' solution.

CSS

.your_element{
    -ms-word-break: break-all;
    word-break: break-all;

 /* Non standard for webkit */
     word-break: break-word;

    -webkit-hyphens: auto;
       -moz-hyphens: auto;
        -ms-hyphens: auto;
            hyphens: auto;

}

No comments:

Post a Comment