XF 1.5 Google ad on Xenforo Gallery page issue

tommydamic68

Well-known member
Its odd, the Google ad I have looks fine on all pages except Xenforo gallery page - any thoughts? It rolls right past my footer. 1st pic is a normal page second gallery page.


Screen Shot 2017-04-01 at 6.56.41 AM.webp

GALLERY PAGE
Screen Shot 2017-04-01 at 6.56.14 AM.webp
 
There are floated elements on the gallery pages so you need to add some additional CSS to the ad container. "clear: both;" should do it.
 
There are floated elements on the gallery pages so you need to add some additional CSS to the ad container. "clear: both;" should do it.
Thanks @Chris D - I added it like so, hopefully thats correct - it seemed to have worked, i'll share the code in case someone runs into the same issue.

Code:
<xen:hook name="ad_below_content" />
<div style="clear:both"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Matched ads -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-xxxxxxxxxxxx"
     data-ad-slot="xxxxxxxx"
     data-ad-format="autorelaxed"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>
 
Back
Top Bottom