Can I change the way WordPress splits words at the end of a line?
-
I find WordPress.com is over zealous at splitting and hyphenating words at the end of a line. On my website at the moment it has split ‘re-ply’ onto two lines, ‘Je-sus’ and ‘larg-er’. Frankly, the words are so short they’d be easier to read if they were shunted onto the next line and written in full. Is there some setting where I can make this less sensitive, so short words like these are not broken up in two?
The blog I need help with is: (visible only to logged in users)
-
Could you point me to the URL of a post where this is occurring? Here’s what I currently see on your site:
The word wrapping is adjustable using CSS, but the default setting appears to be working well from the posts I’ve seen.
-
Thank you for wanting to help.
That’s interesting because I don’t see what you do at all. When I view the same passage ‘Jesus’ in the last sentence of the middle paragraph is split onto two lines. ‘Je-sus’. Why does it act silly on my mine (consistently) but not when you view it? It’s like that on all my posts.
How can I attach a screen shot to convince you of what it looks like this end? -
Hi!
If you upload a screenshot to your Media Library (like you would a picture you want to put in a post), I’m happy to take a look. Screenshot instructions here:
-
Thank you.
I have uploaded a screenshot of the same passage that you looked at and you’ll see ‘Je-sus’ has been split for me but for you had been kept together and put on the next line (much more sensible). As I said, other posts split ‘re-ply’ and larg-er’. Presumably if you looked at them, these words would not have been split.
It seems bad that what I see is not what you see. I don’t know whether other readers will get my view (in which case I want to change it) or yours (in which case I want to see your view too). -
Further to the above, I tried looking at the blog with Chrome rather than my usual browser Internet Explorer 11 and the words are not separated there. Is there a problem with the default word wrapping setting and IE11?
-
Thanks for clarifying (and for giving Chrome a shot). It looks like this might be an underlying issue with IE 11. Can you try inputting this under Appearance -> Customize -> CSS?
.entry-content { white-space: pre-wrap; } -
That just added an extra line between paragraphs on both Chrome and IE. It didn’t affect word wrapping on IE.
I’ll take it out again.
Colin -
-
Sorry about that Colin! I had the selector wrong. Can you try this?
.entry-content p { white-space: pre-wrap; } -
No change from before, IE11 splits Je-sus at the line break, Chrome moves it onto the next line. I removed the CSS addition.
-
This is totally my fault. One final try (this one should definitely work):
.entry-content p { -webkit-hyphens: none; -moz-hyphens: none; -ms-hyphens: none; hyphens: none; word-wrap: normal; }I tested that in Firefox, Safari, and IE.
-
Yes, that’s worked. Thank you. So should I leave that CSS in there now?
Is there a bigger issue here for WordPress to address beyond my own blog? Is everyone else’s blog-s hav-ing l-ine b-reaks too when read by Internet Explorer? -
I just clicked ‘edit’ to edit one of my posts and it immediately removed all paragraphs from the post, all the text was there but in a single paragraph. They had gone both in the editor and also when previewed on the blog. I had to put them back in manually.
The editor hasn’t done that before. Would it be to do with the CSS we’ve added? -
So should I leave that CSS in there now?
Yep!
Is there a bigger issue here for WordPress to address beyond my own blog? Is everyone else’s blog-s hav-ing l-ine b-reaks too when read by Internet Explorer?
It’s a stylistic element with your theme and how it interacts with the browser (also occurs in Firefox and Safari alongside IE). It’s not necessarily a bug.
Would it be to do with the CSS we’ve added?
No – the CSS shouldn’t have any affect on the actually text within the post editor. Can you let me know if this happens again?
-
- The topic ‘Can I change the way WordPress splits words at the end of a line?’ is closed to new replies.