Forum Moderators: martinibuster
<script type="text/javascript">
var width = window.innerWidth || document.documentElement.clientWidth;
google_ad_client = "ca-pub-MYID";
if (width >= 360) {
google_ad_slot = "MYSLOT#1";
google_ad_width = 300;
google_ad_height = 250;
} else {
google_ad_slot = "MYSLOT#2";
google_ad_width = 250;
google_ad_height = 250;
}
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<div id="g-1">
<script type="text/javascript">
adUnit = document.getElementById("g-1");
adWidth = adUnit.offsetWidth;
/* Replace this with Publisher ID */
google_ad_client = "ca-pub-pubid";
if ( adWidth >= 400 ) {
/* Large Rectangle 336x280 */
google_ad_slot = "slot1";
google_ad_width = 336;
google_ad_height = 280;
} else if ( adWidth >= 300 ) {
/* Medium Rectangle (300 x 250) */
google_ad_slot = "slot2";
google_ad_width = 300;
google_ad_height = 250;
} else {
/* Square (250 x 250) */
google_ad_slot = "slot3";
google_ad_width = 250;
google_ad_height = 250;
}
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
I'm not aware of the approved "responsive" adsense code using media queries existing in other languages, on other official adsense pages