This is our Blogger FAQ and Help guide on the questions and issues that are commonly raised by Bloggers as well as the readers of our Blog at Tips for New Bloggers. Here, we shall elaborate on the finer details of the customization tips for your Blog template, give further examples, and answer specific queries. For detailed write-ups and discussions on the topics, please refer to the articles in our main Blog. Before changing any template, please remember to save a copy of the current template. After editing the template, preview it, and save it when you are satisfied with the change.
Blogger FAQ and Help

Header
  • Insert an image to the left of Blog Title and Description [read]
  • Add a Horizontal Navigation Bar in Header Image [read]
  • Unable to remove Header Image [read]

Blog Posts
  • Arrange, customize and shift the Blog Posts and Footer elements [read]
  • Insert a picture or image beside the Blog Post Title [read]
  • How to have standard or pre-formatted text in Blog Posts [read]
  • Add Highlighting to Text and Background Color in Text Box [read]
  • Change Blogger Post URL - SEO Tip [read]
  • Change the Post a Comment Link [read]
  • Add scrollbars to text within Blog Posts [read]

Sidebar
  • Add Background color and image to Sidebar Titles [read]
  • Have different Background colors for each widget [read]
  • Style and Position Sidebar Images [read]

Footer
  • How to align Blog Post Footer elements to the left [read]
  • Move Comments Label to below Post Title [read]

Links and Labels
  • How to add Hover, Mouseover and Rollover effects for links [read]
  • Remove automatic number count in Labels widget [read]
  • Remove link underlines in Blog Posts and/or sidebar [read]
  • Be notified by Blogger when there is a Backlink [read]
  • Change and Edit Labels in Multiple Posts [read]

General
  • How to change Background Colour of TicTac Template [read]
  • How to remove the Pencil or Screwdriver and Wrench icons [read]
  • How to add animated graphics in Blogger Post and Sidebar [read]
  • Add Text Box or HTML textarea code in Blogs [read]
  • Know the limits on our Blogger account [read]
  • How to take Screenshots or Screen captures [read]
  • How to change and transfer Blog ownership [read]
  • Change font size and font styles in template [read]
  • How to center align Page Elements [read]
  • How to insert a separator line between each comment [read]

Search Tricks for New Bloggers

Search World-Wide-Web

We have extended our month-long vacation by a couple of days. We shall be posting articles the moment we return. We noticed that Google had updated the Page Ranks. New bloggers who have been waiting anxiously for this can check their blogs' Page Ranks. We have the PR checker link in our SEO Tools - Search Engine Optimization article.

The blog we created recently in Aug 2007, Blogger FAQ and Help, has also got its first Page Rank, a PR4. All our blogs are now ranked:-

Tips for New Bloggers - PR5
Business Fables and Management Lessons - PR5
Famous Motivational and Inspirational Quotes - PR4
Blogger FAQ and Help - PR4

Thanks to everyone for the support!

Sep 29, 2007

Digg This Story

Center Align Page Elements

A number of queries we received had to do with alignment problems. In some templates, the links, text, widgets and other page elements are aligned to the left. Many bloggers prefer to have widgets in the center of the sidebar or post body. There are a couple of ways to align the page elements within the sidebar or the blog posts. In this tutorial, you will learn how to center align all or selected page elements in your blog.

Header Alignment

If you are looking to center align the Header Title, Description and Header image, look up our other guides - Header Image and Title Alignment (I) for Minima, Denim, Rounders, Herbert, Jellyfish, Harbor and Scribe templates; and Header Image and Title Alignment (II) for the Dots, No. 897, No. 565, Thisaway, Moto, Snapshot, TicTac, Tekka, Sand Dollar and Simple II templates.

Center align all the elements

The general alignment codes are found in the stylesheet. Go to Template -> Edit HTML. If you want the elements in the sidebar to be in the center, try looking for this and insert the alignment code (shown in red):-

#sidebar-wrapper{
text-align:center;
}


In different templates, the CSS classes are named differently. Hence, if you can't find the above, look for any of these and insert the code:-

#sidebar
#sidebar-wrap
#side
.sidebar


Do not save the template. Preview the Template. The text and elements in the sidebar should be in the center and not aligned to the left.

Center Align Page Elements

In the same way, if you want the elements in the main post body to be in the center, add the code here:-

#main-wrapper{
text-align:center;
}


If you don't see this in your template, try inserting the code under any of these or words to that effect and preview the template.

#main
#main-wrap
.main


Center Align Page Elements

To center align the Footer elements, the code can be inserted under any of these:-

#footer
.footer


Center align one element

Suppose you want only one element to be aligned in the center. After you have created that element, be it a picture or widget or text, go to Template -> Edit HTML and scroll to somewhere near the bottom. Look for the widget ID. For example, if we have added a HTML code, a link list and a labels widget in the sidebar, we will see this:-

<div id='sidebar-wrapper'>
<b:section class='sidebar' id='sidebar' preferred='yes'>
<b:widget id='HTML1' locked='false' title='HTML Code' type='HTML'/>
<b:widget id='LinkList1' locked='false' title='Links' type='LinkList'/>
<b:widget id='Label1' locked='false' title='Labels' type='Label'/>
</b:section>
</div>


The highlighted text are the widget IDs. Scroll further up the template and insert after a } character the alignment code like this:-

#HTML1{
text-align:center;
}


Replace the part in green with the relevant ID. This will center align only that particular page element.

DIV alignment tags

The other way to align an element is to insert the DIV alignment tags. Let's say you have created a HTML page element to insert a widget, image links, stat counter, etc. Insert these tags before and after the HTML Code to align that element in the center.

<div style="text-align:center;">HTML Code of widget</div>


Center align element in Blog Post

You may center align a picture, code, table, link or text within a blog post. Just block the part you want to put in the center and click the center-align icon in the Post Editor:-

Center Align Page Elements

Alternatively, you can switch from the “Compose” mode to the “Edit HTML” mode. Insert these tags and what goes in between will be in the center.

<div style="text-align:center;">TEXT TO BE CENTERED</div>


Further reading:-

Style and Position Sidebar Images on image borders and margins in sidebar.

© Tricks for New Bloggers

Found this article useful? Mention us in your post, subscribe to our feed, link to us, or bookmark this site. Thanks for your support!AddThis Social Bookmark Button

16 comments:

bizwhiz said...

It's either that or the template e.g., #HTML1{text-align:center;}

We tried all the methods in our Blogger blogs when we wrote this article.

There is already an article on Sidebar Title Background Color and Image. Can take a look.

Richard said...

hi,first of all thanks for the great site !!!
I'm trying to align the Google search bar from the left to the center. in the below example ,,just what line of the code goes replaces " TEXT TO BE CENTERED"?
thanks,,

Richard


style="text-align:center;">TEXT TO BE CENTERED

bizwhiz said...

Hi Richard

Use the DIV alignment tags (see the section in the article) and insert the Google code between the tags.

Glitry said...

thanks ... coool post.
how to add code to a blog?? showing it as a text

--
http://goodtoknowit.blogspot.com

bizwhiz said...

Hi Chuck Gates

Use the div alignment tags. For example,

<div align="center">WIDGET CODE</div>

bizwhiz said...

Hi Lily

Try this:-

#BlogArchive1 ul{
text-align:center;
}

bizwhiz said...

Hi Lily

If it is a valid picture file, it should display. If the file size is big, it may take a longer while when the page loads. Try reducing the file size and see if the problem persists.

The Shoup Family said...

I need your help! I am a lowly blogger mama and I have been tweaking with your 3 column layout for minima. I have tried to use the coed to have the posts centered with the sidebars on EACH side. And I am still coming up with two sidebars on the right side. I even tried to use the codes that are set for two sidebars on the right thinking they were switched. But to no avail. Can you help me?

www.shoupfam2000.blogspot.com
or shoupfam2000@sbcglobal.net

Thanks, Aja Shoup

ananthannair said...

really good post,thanks friend
it helped me alot in changing my blog
to your views and suggestion.
Thank you sir

POLARFUCHS TREASURES DIGITAL DECORATIONS said...

Hi, when I try to center my widget(s) with the div-align code ALL my main wrapper elements are centered, also the text within the posts. I inserted this code before
div id='main-wrapper'
and the closing-/div after the widget list. This works for all.

But how can I make only the widgets be centered, but not the text of the posts?
Thank you for any tip.
Chris

<b><i>colin aka flamekrayt</i></b> said...

Hey!

To start off, I would like to say that this is a great site! Very helpful indeed.

I also have a question, and this was the most relevant post I could find. I have tested viewing my blog on a 17" computer screen, and as far as I can tell, it fits nicely. However, for widescreen users, my blog is aligned to the left. Is there a way to centralize it?

Thanks!

syed said...

Thanks for this gr8 info. .........

But i hav some doubt...

my blog has alligned to left side....
i hav tried alot 2 bring it normally but i cant.......plzzz help me.......

i hav added text-align:center;} for main-wrapper and also side-wapper....... but still cant do anything....

my blog is: allstuff4u2.blogspot.com

Melissa said...

I recently had my page redesigned, and some sidebar links are centered; some are to the left. I'd like them all to the left. How do I do this?

Melissa said...

I just sent a comment...but wanted to let you know that I found out the answer to my own question. Thanks for your blog - it helps a lot!

gammerth said...

how to e-mail bizwhiz? if i want to ask a question?

LWC Store said...

I have a blog http://lwcfamily.blogspot.com. Manage to download image files but the images appear to be in black and white instead of colours on the blog. When click on the images, the new windows appear with bigger image with colours.

Please enlighten me how to solve my problems.

Thank You