Skip to content

Instantly share code, notes, and snippets.

@marciobarrios
Last active August 29, 2015 13:58
Show Gist options
  • Save marciobarrios/9974834 to your computer and use it in GitHub Desktop.
Save marciobarrios/9974834 to your computer and use it in GitHub Desktop.
Cross browser solution to break words using CSS
.break-word {
/* Only if you support old browsers without hyphenation, break-all forces
to break the word, sometimes leaving one character in a line */
-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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment