How would I go about showing a graphic where an adsense ad would be?


Well-known member
What it comes down to is the need to have a filler graphic behind where an adsense ad would normally appear. Only people with some sort of adblock software enabled would see it.

I've seen it on a few sites, but can't wrap my head around the css or js involved. An example of a xenforo based site would be

If someone has a link to a guide somewhere, or even just a code example I would be very grateful.

Jake Bunce

XenForo moderator
Staff member
An example of a xenforo based site would be
I got this from their source code. Here is the HTML for use in the templates:

Rich (BB code):
	<div class="premiumContainer" style="margin: -15px auto 12px;">
		<div class="notice">
			<a href="{xen:link account/upgrades}"><img src="PATH/TO/ADBLOCKIMAGE.GIF" border="0"></a>
		<div class="adsense">
And here is the CSS which you can add to EXTRA.css. The dimensions of the container need to match the size of your adsense banner (as defined in your adsense code):

Rich (BB code):
	position: relative;
	overflow: hidden;
	text-align: center;
	width: 728px;
	height: 90px;

.premiumContainer .notice
	position: absolute;
I tested this on my forum and it works.