Word Breaks Without Hypenation Using CSS

Posted by Weston Ganger

I had some post titles with long file path names that needed to be wrapped but I did not want it to break lines without hypenation or screw up the layout.

CSS has a simple rule for this:


.my-title{
  word-break: break-word; //non-standard but most supported
  word-wrap: break-word; //correct but less supported
}

Works like a charm.


Related External Links:

Article Topic:Software Development - HTML / CSS

Date:March 31, 2016

Recommended Posts