Friday, September 17, 2010

Centering the Post title (or Page title) in your Blog

This article is about how to centre-align the title that is shown for all Posts and Pages in blogs made with Blogger.


Center/Centre alignment:

Blogger's template designer lets you choose the colour and font-size of the Post title.  This is true even for most Layout templates (ref:  What type of template does my blog have?) though some don't have an option to edit the post-header.

However it doesn't, yet, have an option to change the alignment, ie whether the title is flush with the left or right side, or in the centre.

But this is very easy to do, provided you're willing to accept the disadvantages of editing your blog's layout template.

Simply add this rule to the CSS section of your blog's layout template:
h3.post-title{
  text-align: center;
}
See Adding a new formatting rule to your template if you need help with editing your template to add the rule.


Right alignment?

Making your header right aligned is just as easy:  add this rule instead:
h3.post-title{
  text-align: right;
}


Related Articles: 



Adding a new formatting rule to your template

What type of template does my blog have?

Advantages and disadvantages of editing your blog's layout template

Changing colors in your blog

adsense

0 comments:

Post a Comment

 
 
Copyright © blog
Blogger Theme by Blogger Designed and Optimized by Tipseo