Sunday, January 9, 2011

Default Justify Blog Posts In Blogger

I tend to think of a blog as a book. If you were to print your diary and publish it for the world to see then the print would most likely be justified. This may not always be the best solution though. A lot of websites, including news website, do not justify their text. This may be because as the horizontal space for text reduces, the formatting may start to look out of place. I, however, always prefer justified text as I like having the straight lines. If you decide you want to justify your text then do the following.


First you need to be in Design View and click on Edit HTML. As always, download the full template to keep a backup before you make any changes.

1. In Edit HTML find the following:

.post-body {
line-height: 1.4;
position: relative;
}

2. Add the following code within the parentheses:

text-align: justify;

So your final code will look like this:

.post-body {
line-height: 1.4;
position: relative;
text-align: justify;
}

By replacing the word ‘justify’ with either ‘center’ or ‘right’ you can align the posts in the center or to the right respectively.

1 comment:

  1. Justified alignment is common in MS Word and other word processing programs but very small number of blogs and sites justify their posts. It stretches the text so that each line has equal width like in newspapers and magazines.
    website design

    ReplyDelete