I'am using the new Responsive Ad-Block from Google AdSense. It works very good, but if i resize the window they do not get resized.
Is there any option or possibility to resize or reload the ads? I use media-querys for my Website Layout.
I'am using the new Responsive Ad-Block from Google AdSense. It works very good, but if i resize the window they do not get resized.
Is there any option or possibility to resize or reload the ads? I use media-querys for my Website Layout.
It is not possible (yet). But rotating the screens on mobiles and tablets does resize the ad (if the available space changes by rotating).
The question is: Why you want this feature? Is it to test different screensizes? Solution is to resize the screen and refresh by hand.
The end-user will not resize the window that often, so you will always serve the correct size ad when using the reponsive code from adsense.
As of Aug 2020, this is still not possible it seems.
But at least, in order to prevent breaking of the layout on screen orientation change for example (on screen size breaks in general), I use the following. This breaks the ad (to an extent). But it fits the whole google ad container within the dimensions I provide, with the ad view curtailed.
Considering and hoping that the user doesn't initiate screen breaks often, this is a doable workaround.
@media(max-width: <small_screen_width>) {
.ins-google-adsense, .ins-google-adsense ins, .ins-google-adsense-right iframe{
height: 100px !important; width: calc(100vw) !important;
}
}
For this to work, data-full-width-responsive
in google's <ins>
should be set to "false"
.