PDA

View Full Version : Alternative image if adblocked


RisingGlow
03-26-2012, 05:46 PM
how would i go about doing this. i heard that it involves doing it with div tag but i dont rly get it.

Brandon Sheley
03-26-2012, 06:30 PM
Where did you hear that?

vbresults
03-26-2012, 07:52 PM
Place a flash ad of the same dimensions on top of an image?

setishock
03-26-2012, 10:10 PM
Hmm sensing if a viewer of your forum is running an ad blocker and make them look at a static image where the ad would have been?

RisingGlow
03-26-2012, 10:29 PM
Where did you hear that?
http://www.webmasterworld.com/webmaster/3996622.htm
Hmm sensing if a viewer of your forum is running an ad blocker and make them look at a static image where the ad would have been?
yes, exactly

setishock
03-26-2012, 10:54 PM
I just dechipered your question. I have no clue as to how ro do that. Hopefully one of the guys will come back and give you an answer.

vbenhancer
03-27-2012, 01:29 AM
it is really simple... it's basic CSS actually...

the DIV that contains your banner, you simply have to configure it via its css class to have an image of your choice as background-image... that way, the image will always be there, invisible when you have a banner, and shown when the banner is deactivated... because it is in the background.

RisingGlow
03-27-2012, 01:47 AM
it is really simple... it's basic CSS actually...

the DIV that contains your banner, you simply have to configure it via its css class to have an image of your choice as background-image... that way, the image will always be there, invisible when you have a banner, and shown when the banner is deactivated... because it is in the background.

ya i understand that but i dont know where to put it.
i've tried adding this:
.adblocked {
background-image:url('images/adblocked.png');
}
in additional.css
i then wrapped it around my adsense code with <div id=adblocked>
and it didnt work

vbenhancer
03-27-2012, 02:04 AM
you created a class, but you use ID in your div... it has to be #adblocked in the class...

RisingGlow
03-27-2012, 04:30 PM
didnt work. when the ad was blocked, so was the image

vbenhancer
03-27-2012, 04:49 PM
hum, ok... i never evaluated how the blockers work... so it needs another wrapper around the ads block... with a different name etc... i suppose.. i would have to check it.

setishock
03-27-2012, 08:50 PM
Ok then if the logic of how the blocker works being it blocks the ad code itself, then the alternate image code being inside the ad code, would be blocked also. Whew! Was that long winded or what?
Maybe put the alt image in the body background and use the z-index and position commands to park it where you want it.