stormdamage.org - Art, Webdesign and CSS.

Archive for the ‘HTML’ Category

Sep
4

Wrap long hyphenated text onto the next line

Posted by Leonie under HTML.

When you have a long line of text separated by hyphens, they will not normally be wrapped automatically onto the next line. This can be awkward, as it may break a perfectly good layout by breaking the content out of its containing box.

Some text like this for example, will not wrap if its container is quite narrow (say, in a table column).

466456-34635645-346346346-3463456

There is a solution – it’s the ’soft hyphen’:

­

Which will create a hyphen which will happily wrap onto the next line.