Notification

Please make sure that you visit Your AdSense Page, where you can find personalised information about your account to help you succeed with AdSense.

Improvements to responsive ad units

13 September 2019

On 21 August 2019, we made some improvements to responsive ad unit sizing to allow for better performance on desktop. We also increased the flexibility of responsive ad units by enabling additional size combinations for all device types.

As a result of these changes, responsive ad units can now resize the HTML parent container (e.g. <div>) that they're within. This allows them to automatically adapt to all the different ad sizes on publishers' pages.

Note that for responsive ad units to work properly, they must not be placed inside a container with a fixed or limited height. (See our technical considerations for more details.) If you're experiencing issues with your responsive ad units appearing taller on some devices or browsers, it might be because they're within a container with a fixed or limited height.

If you want to limit the height of your responsive ads, you'll need to modify your responsive ad code. This example shows you how to modify your responsive ad code to specify a fixed height of 90 px and a variable width from min-width 400 px to max-width 970 px:

<ins class="adsbygoogle"
   style="display:inline-block;min-width:400px;max-width:970px;width:100%;height:90px"
   data-ad-client="ca-pub-1234"
   data-ad-slot="5678"></ins>
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1234" crossorigin="anonymous"></script>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>

For more examples and other advanced implementations, see how to modify your responsive ad code.

Was this helpful?

How can we improve it?
true
Your AdSense page

Introducing AdSense Page: a new resource in which you can find personalised information and new opportunities in your account to help to succeed with AdSense.

Search
Clear search
Close search
Main menu
14555481638376005744
true
Search Help Centre
true
true
true
true
true
157
false
false