How to Align Adsense Ads Left or Right in Your Posts

December 29, 2009 · 36 comments


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

Above and 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”.

{ 36 comments… read them below or add one }

Xemytica January 6, 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!

Truck Games January 7, 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

mello yello January 10, 2010 at 9:54 pm

Thank you. I am going to use this info!

kariyerrusya January 31, 2010 at 12:58 pm

thank you for the code..

haberrus January 31, 2010 at 12:59 pm

useful thanks alot.

Pet Site January 31, 2010 at 11:07 pm

I’ve added the ad alignment on my site too. Thank you!

Bubbles Games February 21, 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!

Simon March 1, 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

GaNda! March 10, 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! :)

Melda Dunsworth April 6, 2010 at 8:33 am

can we the adsense user help the Haiti by giving some of our earning?

mim April 16, 2010 at 2:29 am

i got a problem using alignment. it doesn’t work in IE for me.

Udegbunam Chukwudi | StrictlyOnlineBiz May 19, 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

mark@vendingarticles.net May 31, 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.

Phlebotomy Training July 12, 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

giochi December 23, 2010 at 5:27 am

Thank you very much for everything all of a successful working…

Rakesh January 15, 2011 at 12:24 pm

Thanks, it works well with me now, thanks a lot.

Home Design Mild January 25, 2011 at 10:57 am

terimaksih banyak

Justin Bieber games January 26, 2011 at 2:27 pm

Thanks for the tip, it worked fine for me!

Von Bon February 3, 2011 at 4:34 am

Thanks so much! A big help for sure!

Great Thanks! March 31, 2011 at 9:10 pm

I used this on my http://coeliacdisease.org/ site, and it works. Thanks so much!

slug April 10, 2011 at 9:40 am

Perfectly addressed my desire. Thanks!

Anmol May 6, 2011 at 9:17 pm

Thanks a lot. Exactly What I had been looking for :)

TechGopal June 1, 2011 at 10:50 pm

it work for me but i have to align @ center
plzz help me

Engagement rings June 2, 2011 at 8:19 am

Choose your engagement rings from a great variety of diamond engagement rings on diamondmanufacturers.co.uk

Rudi June 27, 2011 at 7:00 am

Hi,

I find this tip very helpful. However, I cannot figure out how to move the AdSense ad a little bit higher.

It was perfectly moved to the right, and I just want it move a little bit higher.

Any help would be greatly appreciated.

Zubair June 29, 2011 at 5:36 am

Thank you so much for sharing this info. Found it really useful trying to sort out my adsense units.

Regards

Cecilia July 13, 2011 at 6:12 pm

As simple as effective, thanks a lot!!!!

Blake From How To Get Cut July 17, 2011 at 6:56 pm

Thanks man. This worked perfectly on my site!

Lorissa October 20, 2011 at 7:02 pm

I have been working on my site for 2 years now . Thank u for the info. now i can aling my ads.

jkhb December 6, 2011 at 10:29 pm

nice information, my website http://www.onlytrick.cogot really high ctr…

jkhb December 6, 2011 at 10:30 pm

nice information, my website http://www.onlytrick.com got really high ctr…

apk December 8, 2011 at 2:45 am

this is great! thank You APK Android

Oren December 18, 2011 at 12:22 pm

This is very interesting. I will try it for my site.

Pearl Jewelry December 26, 2011 at 10:41 pm

Thanks for the info, it worked fine for me!
Choose your Pearl Jewelry and rings from a great variety of diamond Pearl Jewelry rings on oddjewel.com.

Retirement Plan December 28, 2011 at 6:11 am

Thanks. took your advice. Like the way it is displayed on howtoplanforretirement.net.

Do you believe this to be the best place to have your ads?.

Faisal January 10, 2012 at 6:21 am

The ad placed on the top really hurts a lot. I am also considering moving it to the right midway of the post

Leave a Comment

Previous post:

Next post: