Jump to content
WebFlake
  • 0

Adblock message


Shnepsey

Question

Recommended Posts

  • 0

So how about this

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
.innocent-class {
    background: url(http://www.google.com/images/logos/ps_logo2.png);
    width: 240px;
    height: 400px
}


.justForTesting, .advertise_ads {
    width: 240px;
    height: 400px;
    background: #fff
}
</style>
</head>

<body>

<div class="innocent-class"> <!-- just don't call it "advertContainer" :) -->
    <div class="advertise_ads justForTesting">
        advert here!
    </div>
</div>

</body>
</html>

When Adblock Plus finds an element with a class (for example) .advertise_ads, it will hide that element.

If it does, the "please don't block my ads!" background-image (in this case, the Google logo) from the parent element will be visible.

If the advert isn't blocked, the advert will cover the replacement image.

Try changing advertise_ads to something else such as sdpfjsdfjp, and the advert will be visible.

  • Upvote 1

VAEfvMI.png

Liked what i posted remember to feed me a cookie ->
Or you can add a cookie to myCookieJar

Link to comment
Share on other sites

  • 0
<div class="advertisementseventwoeight">
You Ad code here
</div>
<style>
.advertisementseventwoeight {
background-image: url(http://yoururl.com/imagebank/image/picture.png);
text-align: center;
}
</style>

You must host your own image in your server

Edited by Stake™
Removed our link.
Link to comment
Share on other sites

  • 0
<div class="advertisementseventwoeight">
You Ad code here
</div>
<style>
.advertisementseventwoeight {
background-image: url(http://yoururl.com/imagebank/image/picture.png);
text-align: center;
}
</style>

You must host your own image in your server

Thank you but it doesn't work properly..

A) when I turn on my ads blocker it wont show the picture in the background..

B) when I turn off my ads blocker, it shows the ad & the background but not entirely, it's like it's cutting the picture exactly where the ad is placed and continues with the picture at the end of the ad.

 

Picture:

28cj3wk.jpg

*Yes the size of the background picture is 728x90

*you can see, it starts the sentence right there where the arrow is pointing to ("Please disable your ad blocker")

Edited by Shnepsey
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...