Tuesday, 22 April 2014

Blogging Tips: Centre-Align Titles/Dates/Labels

I am now a self-proclaimed computer genius. No joke. Just yesterday I wrote my own CSS code and it worked. IT FRIGGIN' WORKED. Don't worry I was shocked too.

After many hours relentlessly trawling Google for the answer to my blogging problems, I found a few CSS codes that seemed to work for some people but not for me. I took tit bits here and there and managed to construct several CSS codes that did in fact work for me and I feel it is only right to share them with you all in a series on my blog under the very imaginative name of 'blogging tips'.

First up is how to centre-align you blog post title, the date of which you published the blog post and any labels that go along with it. It is a whole lot easier than you would expect and personally I love the look it gives to my blog. Who knew CSS could be so simple?

To achieve this, follow these simple steps:

1) 'Template' > 'Customise'

2) 'Advanced' > 'Add CSS'

3) Copy and paste the codes into the box as needed:

For the title:
.post-title {
text-align: center;

For the date:
.date-header {
text-align: center;

For labels (if appropriate - your labels may be at the bottom of your post and therefore you don't need this):
.post-header {
text-align: center !important;

4) Apply to blog

And you are done, simple as that! I hope this helps, let me know if it works for you so I can feel like an even bigger CSS pro.

P.S. What do you think of the changes I have made to my blog - yay or nay? I added the CSS codes shown above, changed the look of my tabs and also added the pictures on the right. I'm quite likin it.

1 comment

  1. It's amazing how much coding you can learn from blogging! Your blog looks great :)



Thank you so much for spending your precious time reading my rambles. Go ahead and leave me a little comment if you like and I will reply to any questions that you may have. Just make sure to check the 'Notify Me' button!