How To Fixed AdSense Responsive Ads Unit Size

by Moin Uddin Ahmed Tipu | June 4, 2015 4:04 AM

Have you tried to add AdSense Responsive ads unit on your site? Have you faced that you want 336*280px ad but it showing leaderboard? Or something else?

So as responsive ads unit terms, it will cover all free space possible. So you need to fixed it using CSS coding. If you know CSS well, you may fixed it easily. Otherwise you can do this by following this post. And editing Responsive Ads Unit[1] are permitted by Google AdSense.

 

In this post, i will edit a responsive ads unit that will show 336*280px ads on desktop/laptop, 300*250px on tab and 320*100px ads unit on mobile. Yes, by using a single responsive ads unit you can do this.

<style type="text/css">
 .adslot_1 { width: 320px; height: 100px; }
 @media (min-width:500px) { .adslot_1 { width: 300px; height: 250px; } }
 @media (min-width:800px) { .adslot_1 { width: 336px; height: 280px; } }
 </style>
 <ins class="adsbygoogle adslot_1"
 style="display:inline-block;"
 data-ad-client="ca-pub-1234"
 data-ad-slot="5678"></ins>
 <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
 <script>(adsbygoogle = window.adsbygoogle || []).push({});</script>

 

Here you have to replace two value if you want to use on your site directly. One is data-ad-client and another one is data-ad-slot.

Just create new Responsive ad unit from your AdSense Dashboard and copy the value from the responsive ad code. If you want to change ad size, you have to change value from those line:

.adslot_1 { width: 320px; height: 100px; }
 @media (min-width:500px) { .adslot_1 { width: 300px; height: 250px; } }
 @media (min-width:800px) { .adslot_1 { width: 336px; height: 280px; } }

 

Please subscribe us on YouTube for Video Tutorial. We are working hard to create a lot guide about AdSense.

Our YouTube channel: Prime Marketing Exposition[2]

Ask any question you have. We will reply every single question. Also be ready for our next post.

Endnotes: Copyright Proteced. Ask Before Share.
  1. editing Responsive Ads Unit: https://support.google.com/adsense/answer/1354736?hl=en
  2. Prime Marketing Exposition: https://www.youtube.com/channel/UCr_amepdDga8R-7btpLlJRA

Source URL: https://www.freelancehelpline.com/how-to-edit-responsive-ads-unit-on-adsense/