Monday, 7 November 2011

Align post title to center

I did not think about centering the title of the post till I created by forum for my blog. The title "Forum" at the left top left side of the page was making my forum look so artificial. So I actually wanted to center the title of that page and I however came to know that centering the post title will also center the page title. I think it gives better looks to my blog. It is very easy to do.


Go to Design(layout in new interface)>Edit HTML and check the check box " Expand Widget Templates" and press Ctrl + f to find the following section of codes.


h3.post-title, h4 {
  font: $(post.title.font);
  color: $(post.title.text.color);
}

Just use the first line(h3.post-title, h4) of code to find the above section of code.
Then the next thing you need to do is add "text-align:center;" without quotes to the above codes as shown below.

h3.post-title, h4 {
  font: $(post.title.font);
  color: $(post.title.text.color);
  text-align:center;
}

Now you can save the template. You will find your post title at the center.

No comments:

Post a Comment