web analytics

How to Position An Adsense Ad within a Widget


So yesterday I was experimenting with some new themes and found one I liked that utilized those tall, thin “Skyscraper” Adsense ads. It had a left sidebar which I was looking for because I thought I read somewhere that the left side of the page is better on Google’s “heat map.” And then I read somewhere else that the right side was better. So who knows? Do you know?

Well anyway the only problem was that the side bar was a lot wider than the ad, and simply inserting the Adsense code made the ad show up to the far left of the sidebar. It didn’t look right or appealing. So I googled. Right? What did I google?

  • How to position “and” adsense ad within a widget
  • How to position an adsense ad within a widget
  • How to position a java script
  • How to position a Java script Adsense Code

That last one did the trick. About the third result brought me to this page where I found the simple answer, although it’s a little bit down the page and I had to read a bunch of gobledy-goo techno stuff I didn’t understand first.

But the simple answer is using the DIV tag like so:

<div style=”float: right; margin: 10px;”>
(Insert Adsense Code Here)
</div>

Then you tweak it how you like. For instance that exact code moved my ad too far to the right, and I had to tweak my margin to 35px to center it. But you get the picture. However I had to deactivate the theme. I don’t know if there is some bad code in it, or if my servers were just having a problem because my pages suddenly were taking minutes to load, and it was the same for trying to work within the WordPress console itself. Too bad. It was a nice looking theme. Maybe I’ll try it again to see whether it was my servers or not.

Anyway hope that helps. As far as top and bottom positioning, I don’t know. Do you know? I would guess you would use the DIV tag again and some kind of Top or bottom float assignment to it. Just guessing. Of course if I ever need that, I can just Google, right? There’s no need for instruction manuals anymore. Google is the instruction manual. Save the paper. Apple does.

Credit goes to Max Bulber and WMtips.com for this one. Thanks Max. I just bookmarked you in Delicious.

Credit: http://www.wmtips.com/adsense/how-insert-adsense-chitika-javascript-code.htm


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.