How to Align Adsense Ads Left or Right in Your Posts
It is no secret that Adsense recommends larger ad units like the large rectangle. Using recommended Google Adsense sizes that are blended into your posts is likely to result in you receiving much more per click than you would with a smaller ad, on the same page, in the sidebar.
How to Float Adsense
To the right is an Adsense ad.
Notice it is not all smooshed up to the text.
The ad is a 300 x 250 large rectangle which is pretty big for my skinny little blog, but I figured I would show an example that even a large ad in a blogpost does not have to look hideous.
To make it further blend in (or at least be less ugly) I suggest you choose “image ads only” when creating your ad.
Here is the code to position those ads (it is just adding a “div”).
Add your Adsense code and then insert into your page or post.
<div style="margin: 5px; float: right;"> Put ad code here </div>
The above code will work on WordPress blogs, websites, just about anywhere. It also works with just about any type of ad too, not just Adsense.
You can also use padding to control the space between the ad and your text. The above code uses a margin. If you want more space between your ad and your text try changing the “5″ to “10″.
To make the ad go to the left, just replace “right” with “left”.
An In Depth Guide to Improving your Adsense Revenue
A Fresh Look at Google Adsense
SuperPages Affiliate Program is a Gadget
January 6th, 2010 at 1:42 am
That actually looks great. I had to read the blog post to understand that it was actually a ad-sense picture and not a picture that had something to do with the text!
Great work.
I’m trying myself to fiddle with the SEO for my site (which is about collectible card games), and I haven’t dared touching AdSense for it. But I have some other sites with AdSense, and I’ll keep this in mind for them!
January 7th, 2010 at 12:10 pm
This actually very useful information for ad-sense newbies. And also helpful for blogger those who want to keep control over their ad orientations.
Thanks Buddy :d
January 10th, 2010 at 9:54 pm
Thank you. I am going to use this info!
January 31st, 2010 at 12:58 pm
thank you for the code..
January 31st, 2010 at 12:59 pm
useful thanks alot.
January 31st, 2010 at 11:07 pm
I’ve added the ad alignment on my site too. Thank you!
February 21st, 2010 at 10:34 pm
As a website manager, I’m always happy learning new stuff, basic or advanced, it’s a great post that would help lots of webmasters, thanks!
March 1st, 2010 at 8:07 am
For us Germans it can be useful too.. Spending time to find those things can be very borein.. Thank yoy
Simon
March 10th, 2010 at 2:27 am
Thanks alot for that one! really helped me.
I am just starting out with wordpress I am not good with Web stuff…
Great there are folk like you out there!
April 6th, 2010 at 8:33 am
can we the adsense user help the Haiti by giving some of our earning?
April 16th, 2010 at 2:29 am
i got a problem using alignment. it doesn’t work in IE for me.
May 19th, 2010 at 1:13 pm
Thanks for the tip. I’m working on an adsense optimized page template for my blog and this should come in handy.
Cheers
May 31st, 2010 at 8:47 pm
Wow, thanks so much for this fix. I tried several sites and different ways to fix it. This is the only one I could get to work. Much appreciate the help.
July 12th, 2010 at 3:05 pm
Hey, everything seems to work using this method, but I can’t seem to get the ad to move ‘up’. If you take a look at the website I used to post this, you’ll notice the ad on there is just a little below the line of text to the top left of it. It’s driving me nuts! Please shoot me an email if you have a quick fix!
Much appreciated,
Owen