Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Center Adsense Widgets

So if you're like me, you like things to be all nice and lined up.  I recently installed an Adsense Banner below my Pages and it was stuck on the left.  I had added it via the Page Elements Screen, as a basic widget and couldn't for the life of me figure out how to move it to the center rather than it hanging out on the left all out of alignment.  So I did some digging, and found the necessary code changes that needed to be made.

Start out on our favorite "Edit HTML" screen and don't forget to check the "Expand Widget Templates" box or you won't ever find this code!


Using "Ctrl + F" Search for this code:

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

Do you see the line that I highlighted in red?  Replace it with this code:

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

Go ahead and click "Save Template" and now your Adsense banner should be centered on the page!


This post first appeared on My Nerdy Mom, please read the originial post: here

Share the post

How to Center Adsense Widgets

×

Subscribe to My Nerdy Mom

Get updates delivered right to your inbox!

Thank you for your subscription

×