How to right align Google Adsense Ads?

This web page will help you learn how to adjust the html codes so that your Adsense Ads are correctly aligned.

As a Google Adsense Publisher and Website Developer, I have ran into this question many times when placing Google ads on Websites.

How to right align, left align and center Google Adsense Ads on your Webpages?

Okay here is what you do, most of us are used to just copying and pasting the adsense code and that is it. Well if you don’t already know, Google Ads automatically align left when just pasting the code as is. However, it only aligns left but doesn’t float or wrap around the text with out adding additional code to the ad code.

If you want to float the ad to the right you need to add: <div style=”margin: 5px; float: right;”> to the beginning of the adsense code. Then add: </div> to the end of the Google Adsense Code. So the end result will look something like this: <div style=”margin: 5px; float: right;”><script type=”text/javascript”><!–
google_ad_client = “ca-pub-XXXXXXXXXXXXXX”;
/* Help Websites */
google_ad_slot = “6927271837”;
google_ad_width = 336;
google_ad_height = 280;
//–>
</script>
<script type=”text/javascript”
src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script></div>

Please make sure you add your own Google Adsense Code in place of the one above. If you want to float your adsense ad left, just change the word “right” to the word left in the code above. To Center Your Google Adsense Code, Just type in “center” where the word right is without the quotations.

Share This:

4 Comments

  1. I was just looking for this information for a while. After six hours of continuous Googleing, at last I got it in your web site. I wonder what’s the lack of Google strategy that do not rank this type of informative web sites in top of the list. Usually the top websites are full of garbage.

  2. You actually make it appear really easy with your presentation but I in finding this topic to be really something that I feel
    I’d never understand. It kind of feels too complex and very broad for me. I am looking forward in your subsequent submit, I will attempt to get the cling of it!

Leave a Reply

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