I want to break the long word with the hyphen at the end of the first line.
Expected:
BERUFSBILDUNGSZENT-
RUM
Got this:
BERUFSBILDUNGSZENT
RUM
Here's my html and css:
<div class="content">BERUFSBILDUNGSZENTRUM</div>
.content {
max-height: 80px;
width: 200px;
overflow-x: hidden;
word-wrap: break-word;
padding: 10px;
-webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto;
hyphens: auto;
font-weight: bold;
font-size: 16px;
border: solid 1px #000;
}
You can check my JSFiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With