Thursday, 3 November 2011

How to center a picture in your blog's sidebar, using Blogger



This post will look at how you center a picture in your blogger sidebar.

Firstly you need to go to Design > Edit Html and tick expand widgets. Secondly search for the text: widgetid='image1' remember to look for a different number as indicated in green depending upon which image widget you are intending to change.

Now add --> align='center' <-- to <div id='sidebar-wrap'>  which should be located near the widgetid='image1' text, it is usually below it.


Your line should now look like:

<div align='center' id='sidebar-wrap'>


Now click preview check it works, if it does not click clear edits and consider changing the number in green if you have more than one image widget. Or if it works in the preview click save and your done.

How to center the Adsense widget in the Blogger sidebar


This post will look at how to center the adsense widget in the blogger sidebar of your blog. 
Firstly you need to go Design > Edit Html and tick expand widgets. Then search for the following lines of text:


[<b:widget id='AdSense1' locked='false' title='' type='AdSense'> 
<b:includable id='main'> 
  <div class='widget-content'> 
    <data:adCode/> 
  </div> 
</b:includable> 
</b:widget>] 



Now in order to achieve your desired effect you must add the following in red the following:


[<b:widget id='AdSense1' locked='false' title='' type='AdSense'> 
<b:includable id='main'> 
  <div class='widget-content' align='center'
    <data:adCode/> 
  </div> 
</b:includable> 
</b:widget>



In order for this method to be successful you will need to take into account the location of your sidebar adsense widget in relation to the other places on your page where you have adsense. For example if you have an adsense header on you page you may need to search instead, note the blue text, for your second adsense widget (AdSense2) or possibly your third adsense widget (AdSense3) located in your Html. So if the first option does not work for you, clear your edits, and try again for your other adsense widgets until you achieve your desired result.