Karl Seguin Karl Seguin - 1 year ago 86
CSS Question

How to word-break on a dash?

Given a relatively simple CSS:

div {
width: 150px;


How do I make it so that the string stays constrained to the
of 150, and simply wraps to a newline on the hyphen?

Answer Source

Replace your hyphens with this:


It's called a "soft" hyphen.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download