XF 2.1 Advertisement overflow

You need to use responsive ads, or use some CSS to force them to be responsive.

Example:

Use this for your ad:

HTML:
<a href="https://example.com"><img src="ad.jpg" alt="" class="ad_responsive"></a>

In extra.less add this:

CSS:
.ad-responsive {
    max-width: 100%;
    height: auto;
}
 
AdminCP >> Setup >> Advertising >> Add Advertisement or Select Position

In the text box for HTML, something like this:

Code:
<center>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- BW_Responsive -->
<ins class="adsbygoogle"
   style="display:inline-block;min-width:300px;max-width:728px;width:95%;min-height:90px;max-height:200px;height:200px;"
     data-ad-client="ca-pub-123456789"
     data-ad-slot="123456789"
     data-full-width-responsive="true">
	 </ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</center>
 
AdminCP >> Setup >> Advertising >> Add Advertisement or Select Position

In the text box for HTML, something like this:

Code:
<center>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- BW_Responsive -->
<ins class="adsbygoogle"
   style="display:inline-block;min-width:300px;max-width:728px;width:95%;min-height:90px;max-height:200px;height:200px;"
     data-ad-client="ca-pub-123456789"
     data-ad-slot="123456789"
     data-full-width-responsive="true">
     </ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</center>
Thanks I will try it and see how it works.
 
Top Bottom