Forum Moderators: martinibuster

Message Too Old, No Replies

Stop Adsense ads resizing?

         

leebow

12:19 pm on May 21, 2018 (gmt 0)

10+ Year Member Top Contributors Of The Month



I've just noticed today - even though I'm not using responsive ads - I use fixed size 728x90

AdSense ads are auto-sizing to the users window - and not to the site I want.


Does anyone know how to stop this?

I've tried wrapping the ad in a fixed size div - display: block

But that isnt helping.

Cheers.

MayankParmar

6:36 pm on May 21, 2018 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month



Have you tried @media method?

leebow

10:38 am on May 22, 2018 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thanks MayankParmar,

I followed the steps in this guide:

[support.google.com...]

I don't personally use responsive ads - but this guide also helped with the non-responsive ads. I want my ads fixed at 728x90 on desktop -- then I load different adsense ads for tablets/phones myself

In the end I did the following - look in adsense code for the "width", and change it to "min-width"

<ins class="adsbygoogle"style="display:inline-block;width:728px;height:90px"
Became:
<ins class="adsbygoogle"style="display:inline-block;min-width:728px;height:90px"


And that fixed the problem.

Cheers.

keyplyr

10:58 am on May 22, 2018 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I control responsive ad size by controlling the size of the container, usually a <div>

leebow

1:47 pm on May 22, 2018 (gmt 0)

10+ Year Member Top Contributors Of The Month



Yeah - that was my first idea - wrap it in a div - and then set the div to block, and fixed size.

It didn't work - the iframe created by adsense was being resized - so although I had a fixed size div - the ad was smaller inside.

I don't even use responsive ads - so I want them to be the size I want.

if a mobile user visits my site - then I load mobile sized ads.

Until then - I don't want a desktop user, who just hasn't opened their browser with a full screen window not seeing the high-paying more attractive 728x90 ads - instead of some text-based 600px sized ads.

Pedro_M

11:02 am on May 26, 2018 (gmt 0)

5+ Year Member



Hi leebow, if I understand, you don't want a bigger ad size to display a smaller creative? Like this:

300×250 showing up in 328×280
468×60 showing up in 728×90

If that is the case, I believe you can disable this feature in "Ad Serving", located in Allow and Block ads -> Content -> All my sites (or specific one) -> (in the tabs) Ad Serving -> Similar sized display ads - show similar-sized display ads resized to fit within ad units.

If the problem happens in mobile, something like a 300x250 ad size filling up the mobile user full width screen becoming something like a 411px x 250 you can disable this with 'data-full-width-responsive="false" ' in the INS tag. Read more at:

[support.google.com...]
[support.google.com...]