Jump to content

responsive ads breaking border


Recommended Posts


I had this same issue a while back myself.  Long story short, it is an issue with Googles responsive ads (Google will claim it is the software but as pointed out below in a ticket, it is an issue on Google's end using device resolution instead of container size).  Here is @Ryan Ashbrook's response to my ticket last year on the issue:




Actually, our software would not likely have much effect on this - the problem actually seems to be due to Google not detecting the available space correctly. It appears to be looking at the resolution of the device, rather than the size of the slot it is inserted in too. As such, it isn't taking the sidebar into account when trying to display the ad.


See the following page - you can manually set a maximum width for the ad to fit within your slot, while maintaining responsiveness.




Further, I also noticed that once the page is rendered, the ad does not "watch" to see what size the browser window is. As such, if you resize your browser (a typical way to quickly test responsiveness) the ad itself does not automatically adjust. If you refresh, however, it does, which is a further indicator that it is reading the size of the browser rather than the allocated space it is contained in.




Ryan Ashbrook
Invision Power Services, Inc.


To resolve this I changed the 'Style' of the AdSense code to this:



Between the link Ryan sent me in the support ticket and the Google support link above I was able to figure out the workaround.  Keep in mind my style changes should work for most forums, but, every theme is different and every admin has certain requirements so my style changes may not fit exactly.  Basically the style change forces the responsive ad to only go 970px wide by 90px high for banners.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...