Centering your Google Adsense Widget

June 21, 2009 Leave a Comment

Google AdsenseGoogle Adsense

Its been my problem in the past that all the Google Adsense widgets that I put on a sidebar are always displaying on the left side portion.

And it takes me to long to tweak a solution for centering a widget. I tried all my knowledge in CSS but nothing have worked.

Again I will share to you the trick:

1. Log-in to your Blogger Account.

2. Go to Lay-out, Edit HTML.

3. Click Expand Widget Templates.

4. Look for the sidebar field that you want to edit. (eg. <div id='sidebar-ads'>>)

5. And a few lines after that you will see: <div class='widget-content'>

6. Now, insert this code.

align='center'

7. Should look like this:

<div align 'center' class='widget-content'>

8. Save.

Stumble
Delicious
Technorati
Facebook
Digg

4 comments »

  • James Arnold Nogra said:  

    I remoce my google ads after my adsense was banned. nice information posted in here... please feel free to visit my blog... http://babydesertwolf.blogspot.com/

  • jake said:  

    thanks for your visit!

  • Claire said:  

    Thank you - I trawled the net for hours before finding this piece of code which worked for me!!

  • Jake Ilac said:  

    You're are very much welcome Claire!

  • Leave your response!

    Add your comment below,or trackback from your own site. You can also subscribe to these comments via RSS.

    Be nice. Keep it clean. Stay on topic. No spam.