Reputation: 6681
I've just launched my new site, and in going though it in multiple browsers to see how it performs, I've noticed something weird.
Can you see the gap after the word 'but'? By my reasoning, the word 'was' on the following line should be next to it, as there is plenty of space for it - but as you can see, it isn't.
Although this screenshot is from Firefox (10), I'm getting the same thing in Chrome (17) and Internet Explorer (9).
Using Firebug to inspect the element, it is showing a
between the 'was' and 'disappointed' (which would explain why it isn't on the line above) - but upon viewing the source, no such
exists.
This is leading me to suggest that the browser is inserting them - but I have no idea why.
Anyway, the page in question is http://limeblast.co.uk/2012/02/currently-playing/
Upvotes: 5
Views: 6530
Reputation: 654
I had the same problem with text coming from the WP tinymce editor. This here solved it for me:
function b09_remove_forced_spaces($content) {
$string = htmlentities($content, null, 'utf-8');
$content = str_replace(" ", " ", $string);
$content = html_entity_decode($content);
return $content;
}
add_filter("the_content", "b09_remove_forced_spaces", 9);
based on https://stackoverflow.com/a/21801444/586823
Upvotes: 0
Reputation: 6237
I used wget to download the page directly to a file and I noticed that the space between was and 'disappointed' and all other spaces that you see as
are encoded with two bytes, C2 A0 hex, while the other spaces are encoded with one byte, 20hex. Hope this helps.
Off-topic, I would also recommend justifying the text.
Upvotes: 1
Reputation: 1590
I took a look and tried a few things with your code, best solution I would recommend is to force your
to be justified, right now your text is left aligned.
Upvotes: 0
Reputation: 3309
You should look into your colorbox implementation. It isn't working properly, and it's causing other issues on the page. I don't think it's necessarily related to what you're describing, but fix it, and you'll get your colorbox effect that you're after.
Upvotes: 0