Reputation: 3
I wonder if its possible to control the typography when using wordpress? For example, if a word doesn't fit in the row, it gets hyphenated and doesn't jump to the other row. The customer I am doing a website for wants the words that doesn't fit in the row to get hyphenated.
Update:
p { hyphens: auto; margin-bottom:24px; font-family:candara,arial,sans-serif; color: #000000; font-weight: 300; }
The hyphens: auto;, didnt work
Upvotes: 0
Views: 57
Reputation: 191
I found a good answer to this question here: https://justmarkup.com/log/2015/07/dealing-with-long-words-in-css/
.hyphenate {
overflow-wrap: break-word;
word-wrap: break-word;
-webkit-hyphens: auto;
-ms-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
Upvotes: 1
Reputation: 11
It sounds like you may have tried something along these lines already, but CSS Tricks gives a more thorough explanation of how the hyphens property is language-dependent. Different languages have different default behaviors for hyphens. Also browser support for the hyphens property is a little spotty, with Chrome only supporting the "none" value.
Upvotes: 1