Content not sized to viewport


Active member
Since installing the media gallery (pre xf ownership), I've had my webmaster tools warning report ramp up about content not sized to viewport. I've upgraded to latest versions last week and nothing has changed.

Given that images are images, what's the best way to solve this? auto scale?


Chris D

XenForo developer
Staff member
It's not actually your gallery content.

It's your ads. Here's a screenshot:


Try implementing some sort of responsive ad units. For support with that, consult your ad provider or search as there are guides on implementing responsive ads through various providers.


Active member
Interesting... as I am using google's responsive ad units in the global header ad template, and it DOES respond on the main forum areas like this and the media area for me...

<div style="text-align: center">
<script async src="//"></script>
<!--  Header Responsive -->
<ins class="adsbygoogle"
(adsbygoogle = window.adsbygoogle || []).push({});


G ads won't refresh/rebuild onResize, so scale down then F5 and you should see it that was as well.
Last edited:


XenForo developer
Staff member
It responds for me as well (have to have the window shrunk first; it doesn't tend to show an ad at the top when it's very small).

I would note that at the smallest my Chrome window is going, the ad in the sidebar causes it to slightly overflow. Otherwise, I'm not seeing any overflow issues when browsing.


Active member
When i have my chrome shrunk down as far as it will go, i don't get any ads at all in the side bar.

To note, no reports of the media index are showing up, it's actual image pages.

ie, try:

Since the homepage doesn't show the sidebar on small screens, but the media gallery does, i think that may be the issue with the ad unit in the sidebar.

Can we turn off or otherwise make the sidebar more responsive for super small devices?

any suggestions for a @media query for the ad unit block?


XenForo developer
Staff member
I don't think a media query to hide the ad unit is the way to go, as you'd still be serving the ad but not displaying it. You may need to adjust the JS code to not serve that ad below a specific width (as in, don't insert the standard div/ad code in that case).


Active member
Good point.

I've dropped that ad unit, as it doesn't perform anyway. Ill monitor and see what comes out in the next couple weeks.

Thanks for he extra eyes.