Sure, I know that - I was just illustrating that the Ads only appeared when I set a specific width using a DIV or the alignmet AUTO.If you want to set a size, you can do that from the ad/package settings. No need to wrap the ad code yourself.
That's exactly what I'm saying.Are you saying that the adsence code wasn't added to the page because it was set to center? That only happens when you use the lazy loading feature which will load the ad content after the page loads and the ad container is in view.
Normally, Adsense will serve an advert and you'll see all the associated HTML/CSS to style and define the block, then a bunch of iframe stuff nested several levels below it to to display the advertisement.
With Alignment set to CENTER the HTML of the page has the Adsense code block only, like this:
Code:
<div class="samCodeUnit samAlignCenter" data-position="container_breadcrumb_top_above">
<div class="samItem">
<div align="center">
<ins class="adsbygoogle" style="display:block;" data-ad-client="ca-pub-xxxxxxxxx" data-ad-slot="xxxxxxxxxx" data-ad-format="horizontal" data-full-width-responsive="false"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
</div>
</div>
</div>
Set to AUTO and it loads the block and the advert HTML too.
When I test it with CENTER the browser reports that -- samCodeUnit samAlignCenter -- renders a block of 0x0 pixels.
When I test it with AUTO it reports 1300 x 0 (the default width of the forums).
When I REMOVE "margin: 10px auto;" from samAlignCenter it changes from 0x0 to 1300x0 - could that be the cause?
Presumably Adsense can't serve an advert of 0x0 pixels?
Quite why it is doing it I've no idea, but that seems to be the nub of it.