Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Break non-hyphenated compound words at word boundary

Tags:

I am using Bootstrap. Let us say I have text that looks like this:

"Stackoverflow"

Can I somehow automatically make sure that it breaks like this if the text does not fit the container:

"Stack
-overflow"

instead of:

"Stackov
-erflow"

with HTML/CSS?

like image 850
Obsivus Avatar asked Apr 22 '16 11:04

Obsivus


People also ask

How do you know if a compound word is hyphenated?

Compound words can be written in three ways: as open compounds (spelled as two words, e.g., ice cream), closed compounds (joined to form a single word, e.g., doorknob), or hyphenated compounds (two words joined by a hyphen, e.g., long-term).

Are compound words always hyphenated?

A compound word is a union of two or more words, either with or without a hyphen. It conveys a unit idea that is not as clearly or quickly conveyed by the component words in unconnected succes- sion.

Which type of compound words are combined with no spacing in between two words?

Closed compound words are combined with no space between the two words, such as toothbrush or campfire.


1 Answers

You can insert ­ (soft hyphen)

#box {    font-size:14px;    font-family:courier;    width:90px;    background:yellow;   }
<div id="box">Stack&shy;overflow</div>
like image 120
jayms Avatar answered Oct 15 '22 21:10

jayms