Nov 24 2009

How to Align Adsense Right or Left in your Blog Posts

If you are wondering how to align your Adsense ads in your blog posts to the right (float right) (as I have it when you go to the page) or align to the left (float left), then follow these simple instructions.

I use the Adsense Deluxe WordPress plugin, so if you haven’t already done so, it is a good idea to add the Adsense Deluxe plug-in first or similar WordPress Adsense plug-in which you can find in the WordPress plugin directory. An adsense WordPress plugin will make it easier when you want to change your Adsense code so you don’t have to edit every post, you just change the code you added in the plug-in and it changes the code for all your ads on your blog. If you don’t use wordpress, you can still use the following instructions, but you will need to place your full Adsense code in place of the Adsense Deluxe code.

After you have set up your Adsense Deluxe WordPress Plug-in with your Adsense code, you just use the following code and add the Adsense Deluxe code for the ad you want to appear in place of the “ADD CODE HERE” text…

(leave out the p with arrow brackets at the end as wordpress is adding it in to the code and it shouldn’t be there)

…and place it at the start of your post and start typing your article right after as shown in the image just below…
adsense-align-code-placement-screenshot

The above code will align your adsense ad to the right (float right) in the blog post as I have mine when you’re on the page. (I have my blog set to show the blog post ads only when you’re on the page of the blog post).

If you want to align your adsense ads to the left (float left) in your blog post, use the following code (replace “ADD CODE HERE” with the Adsense Deluxe code for the ad you want to appear)…

(leave out the p with arrow brackets at the end as wordpress is adding it in to the code and it shouldn’t be there)

If you created different Adsense ads in Adsense Deluxe you can replace the Adsense Deluxe code with the one you want to appear. As you can see in the image I’m using one that I created which is called “skyscraper” which aligns to the top right in my blog post because I placed it right at the start of my blog post. (Remember when changing the Adsense deluxe code, the code includes the part that looks like arrows).

adsense-deluxe-screenshot

You can also change the margins to what you want, but I recommend leaving them as they are in the code I provided at 5px for the top, right, bottom, and 20px for the right. That will leave the appropriate amount of space between your Adsense ad and your blog post text, as you can see with my ads. It makes it look better because you don’t have the text too close to the ads and you also don’t want too much space between them.

You can also place the code further down in your blog posts, as I did with another block, if you want your ads to appear further down so your readers run into the ads while they are reading your articles.

If I am using a wide image at the top of a blog post I like to place the adsense ads a little further down (example) into the post. You can try different ad placements to see which work best for you.

If this tutorial has helped you please feel free to post your comments below.

If you need some help or if you have any questions please post them below and I’ll answer them when I can.

43 Comments on this post

Trackbacks

  1. watch online tv said:

    How do I align certain text to the right of my myspace page an others to the left?

    November 26th, 2009 at 9:23 am
  2. watch online tv said:

    What is HTML code to position my Adsense Ad at the top of my website?

    December 3rd, 2009 at 3:55 am
  3. Simmental said:

    I change were google adsence appears on my webpage? right now, it apprears at a random spot in the middle of my page, how do i align it so it appears on the left? Thanks.

    May 14th, 2010 at 4:25 am
  4. compact digital cameras said:

    You have helped solved a major problem. Thanks for sharing this technique. I have always been having challenges using Adsense Deluxe on my blog.

    May 14th, 2010 at 4:41 am
  5. compact digital cameras said:

    Thank you very much for this tip. I have been messing with table parameters and single post.php forever. I have successfully implemented the adsense tip here on all my sites.

    June 3rd, 2010 at 2:14 am
  6. Paint brushes said:

    If there is already a line for margin property delete it and add above line. This will prevent blog from getting too close to the screen edge.

    July 5th, 2010 at 4:07 am
  7. Simmental said:

    This actually very useful information for ad-sense newbies. And also helpful for blogger those who want to keep control over their ad orientations.

    July 5th, 2010 at 4:59 am
  8. compact digital cameras said:

    This Adsense ad unit in top left or right corner have highest CTR on my blogs like software Testing blog.

    August 2nd, 2010 at 6:31 am
  9. Paint brushes said:

    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.

    August 4th, 2010 at 1:47 am
  10. Simmental said:

    congratulations for fantastic sharing i love this blog very much…

    August 4th, 2010 at 3:37 am
  11. Paint brushes said:

    This is the third article in a series on adding Google Adsense to a Blogger Blogspot blog. In this tutorial you will learn how to add Google Adsense to the header of your blog.

    September 8th, 2010 at 6:06 am
  12. Simmental said:

    I am quite new to WP and using plugins to display adsense ads. I will try your trick sometime and see how it works with my theme.

    October 1st, 2010 at 11:41 pm
  13. web designing tips said:

    Hi I have just started my web page and I plan to put google adsense ads on it later. I have a very good traffic on my site.

    November 2nd, 2010 at 1:57 am
  14. Simmental said:

    What is the minimum conditional requirement to get approval for Google Adsense account through posting blog.?

    November 2nd, 2010 at 5:31 am
  15. Paint brushes said:

    I want to take off a picture post from my blogger blog. How do I do it?

    November 2nd, 2010 at 6:43 am
  16. Restaurants in delhi said:

    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!

    December 3rd, 2010 at 3:54 am
  17. bad car credit said:

    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!

    December 18th, 2010 at 11:46 pm
  18. cuff links said:

    This actually very useful information for ad-sense newbies. And also helpful for blogger those who want to keep control over their ad orientations.

    December 30th, 2010 at 12:18 am
  19. Cheap Car Insurance in California said:

    Thanks for sharing this tip.
    When i placed the div tags as suggested, the ad block is showing up correctly left aligned, but…the post content is showing up as strip instead.
    Any suggestion …how I can fix this ?

    December 31st, 2010 at 12:56 am
  20. Restaurants in delhi said:

    I had too such experience before. But after that i write sticky to topic and keep in mind always the niche. Its completely true that visitor likes nice information and then they be the regular visitor..

    January 5th, 2011 at 6:34 am
  21. Event lighting said:

    Thanks for these tips. I’m an newbie with Adsense and this helped me a lot!

    January 5th, 2011 at 10:25 am
  22. vector security said:

    To achieve the Zero count with MS Query, you could add a column in the query, to calculate the count.

    January 5th, 2011 at 10:33 am
  23. Delhi Hotels said:

    It’s always sad to hear whenever someone passes away, I hope Roger rests in peace, and is in a better place now.

    January 8th, 2011 at 3:41 am
  24. windows 7 said:

    I am still afraid to use FB Button. Some article said that it is not safe.Is FB button safe?

    February 9th, 2011 at 1:24 pm
  25. Delhi Hotels said:

    Before you start check how text is currently aligned on your Blogger posts. If it is left aligned you will be able to follow this trick to justify it. If it is already justified no need to go any further..

    February 23rd, 2011 at 11:24 pm
  26. Ecommerce Leeds said:

    How do i change were google adsence appears on my webpage? right now, it apprears at a random spot in the middle of my page, how do i align it so it appears on the left? Thanks…..

    February 27th, 2011 at 4:39 am
  27. Ecommerce Leeds said:

    I have read Google Adsense’s TOS and it states that Google Adsense has a right of exclusivity on your site. Does this mean i cannot also have ads from another company on my site? Thanks…..

    February 27th, 2011 at 4:41 am
  28. vector security said:

    That is great for putting adsense on individual posts, but if you want to include it on every post I would use a plugin like the ‘why do work adsense plugin’..

    February 28th, 2011 at 1:23 pm
  29. Delhi Hotels said:

    I read through the entire eBook, but the videos don’t work. Any thoughts?

    March 2nd, 2011 at 1:23 am
  30. Online SEO Web Service said:

    What ive heard you install it on a domain and can use it on many others too, great as i am getting it in some days to use…..

    March 12th, 2011 at 1:10 am
  31. freeabizz said:

    Thanks, it’s works for me

    March 22nd, 2011 at 11:16 am
  32. şakacim said:

    Thanks for sharing this tip. ;))

    April 17th, 2011 at 8:28 am
  33. şişme bebek said:

    This actually very useful information for ad-sense newbies. ;)

    April 17th, 2011 at 8:29 am
  34. customer retention programs said:

    I have a google ad-sense.Can anybody advise what is best way to market your site taking into account of google policy as my site is not making much earning.Thanks

    April 23rd, 2011 at 12:13 am
  35. Ecommerce Leeds said:

    I have a Blogger blog that is hooked up to my personal website. The actual blog is linked off of the homepage. I would like to know if there’s a widget or something that I can put on my website’s homepage that will show my latest blog posts. Not the whole post, but maybe just the headline and a link to go to my blog.

    May 25th, 2011 at 7:53 am
  36. Delhi Hotels said:

    Do not place more than the maximum number of ads that Google allows on one page.

    June 2nd, 2011 at 11:32 pm
  37. document assembly said:

    something that I can put on my website’s homepage that will show my latest blog posts. Not the whole post, but maybe just the headline and a link to go to my blog.

    June 3rd, 2011 at 4:08 am
  38. cuff links said:

    I came lately to your post and have been reading along. I thought I would leave my initial comment. Keep writing, cause your posts are impressive! Doesn’t it take up a lot of time to keep your blog so fascinating?

    June 4th, 2011 at 7:26 am
  39. Ecommerce Leeds said:

    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. Thanks

    June 8th, 2011 at 2:23 am
  40. document assembly said:

    I like to place the adsense ads a little further down (example) into the post. You can try different ad placements to see which work best for you.thanks for sharing this nice information..

    August 25th, 2011 at 3:21 am
  41. Ergonomic Chairs said:

    Can anyone provide the align code in HTML for making Google ads appear on the sides of awebsite?

    September 1st, 2011 at 12:18 am
  42. Isolation Transformers said:

    This is so helpful! Thanks so much for your instructions and the codes. :)

    February 2nd, 2012 at 1:23 am
  43. Five Star Submersible Pumps said:

    Thank you very much for this tip. I have been screwing out with desk factors and individual publish.php permanently. I have efficiently applied the adsense tip here on all my websites.

    July 4th, 2012 at 1:25 am

LEAVE A COMMENT

Subscribe Form

Subscribe to Blog