Google Ad Words - Responsive Ad Units
- Generate the ad code.
- Place the code on your site.
- Optionally, modify the ad code for advanced mode. None of the default codes worked for me. The following is what worked on this site. The most important parts are
max-width:100%; overflow:hidden
.
<style> .ad-sense-02-responsive { width: 320px; height: 50px; max-width: 100%; overflow:hidden; display:block !important; margin:auto !important; margin-top:25px !important; } /* the @@ is for Razore Views */ @@media(min-width: 500px) { .ad-sense-02-responsive { width: 468px; height: 60px; } } @@media(min-width: 800px) { .ad-sense-02-responsive { width: 728px; height: 90px; } } </style><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- ADSENSE02_Responsive --> <ins class="adsbygoogle ad-sense-02-responsive" style="display:inline-block" data-ad-client="ca-pub-6542429488011130" data-ad-slot="9782767204"></ins>
<script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>
References
https://support.google.com/adsense/answer/3213689
https://support.google.com/adsense/answer/3543893