How to fix the WordPress word spacing problem

The drama of WordPress word spacing issues: When I first installed WordPress blogging software, I was impressed and thought to myself, this is much better than most of the previous open source blogging software I've used. As I started to become more familiar with WordPress, I began to find some small bugs and quirks. Most of these bugs and quirks were fixed with simple update versions of WordPress and third party plugins.

But there was one bug in particular that was becoming very annoying.

WordPress Word Spacing Drama

Every time I would publish a post, some of the words within the post would show up with more spacing than others (extra word spacing). What seemed even more strange was that some of my blogs looked fine, while others had large gaps and spaces between words within the posts. There seemed to be no valid resources online addressing the problem. So I had set out to fix the word spacing problem myself.

After thoroughly analyzing the differences between the blogs that had the problem and those that did not, I came to a conclusion that it was only occurring with the Default Kubrick template. Now to find and fix the source of the problem within this template. Going through the cascading style sheet for the Kubrick template, I found the culprit. The text-align setting for posts was set to justify. When text alignment is set to this value, each line of text must be the same length. So if your sentences and paragraphs are not created of equal length when you write them, the spacing within the words will auto adjust to make each sentence start and end at the same place within each line.

This is all fine and dandy for the look of the outside perimeter of your text box but can create weird spacing anomalies between your words.

How to fix WordPress Word Spacing

Ok, so your probably reading this article because you've had this problem and you are looking for the solution. Let's get to the point ~ Here is how to fix it:

  1. Login to the admin section of your WordPress blog.
  2. Select Design and then Theme Editor from the admin menu.
  3. On the right hand side, you should now see a list of WordPress theme files. To the left, the currently selected file of which is ready to edit.
  4. Select the stylesheet file from the list on the right. To the left, it should now state that your editing style.css
  5. Now within the stylesheet (style.css), find the following:
    .post {
    margin: 0 0 40px;
    text-align: justify;
    }
  6. Edit the file changing justify to left.
  7. The section should now look like this:
    .post {
    margin: 0 0 40px;
    text-align: left;
    }
  8. Click update file and go view your site.

You should see your posts with the text now aligned to the left. The sentences may vary in length but the word spacing problem should be resolved.