7

How to make the Google Adsense block transparent?

It uses iframe, and resides on other domain, so jQuery can't do anything. I tried to target it with css, but that's also impossible. Any ideas?

I'm not trying to game adsense system, simply I've a background image, and with solid fill the ad looks disgusting.

JJJ
  • 32,902
  • 20
  • 89
  • 102
  • Just for the record, it is an option now: https://support.google.com/adsense/answer/113262?ctx=tltp&hl=en – Hash Jul 10 '17 at 08:15

3 Answers3

4

I think some other people have answered correctly that you can't really do this. But what really is the root problem here? You are trying to avoid the ad looking bad on a background image.

simply I've a background image, and with solid fill ad looks disgusting!

Well, why not add some sort of effect that is strictly on your page but makes the ad simply look better. I'm thinking the easiest way to do this is with a box shadow: http://css-tricks.com/snippets/css/css-box-shadow/

Here are some examples of what such an effect might look like:

http://jsfiddle.net/7wPrS/3/

http://jsfiddle.net/7wPrS/4/

Jere
  • 3,377
  • 1
  • 21
  • 28
3

This is a famous question asked in years. The answer is " YOU CANNOT " (at least for normal account)

Why? Because if can, then so easy to cheap and trick people to click

Eric Yin
  • 8,737
  • 19
  • 77
  • 118
  • 1
    ah... and I've completely legitimate reason!: background with texture... and add looks horrible without transparency! –  Jan 20 '12 at 19:10
  • how can you avoid other people abuse it? – Eric Yin Jan 20 '12 at 19:34
  • That way they ensure background and foreground color are different enough to see the text rather than making something like a big button "click here" that's in fact the ad banner with some random "OK" text in center. – Mario Jan 21 '12 at 14:21
1

While you may not be attempting to game the system, many, many others have. As a result, Google uses an iframe to strictly limit what you can modify - they can't possibly do this on a case-by-case basis, so quite frankly Google should not allow this. You cannot set a transparent background, only a solid color of your choosing.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368
  • There are no strict rules from Google. If the modification makes the ad to fit the layout better, I don't see a problem. – danijar Jan 19 '12 at 18:46
  • I didn't say "rules". They're technological limitations as implemented and desired by Google. A transparent background is easily abused by someone trying to boost clicks, hence it is not an available customization. – ceejayoz Jan 19 '12 at 18:56
  • 1
    I think so. I got it work with Javascript. So it IS possible. :-) Even if not in a comfortable way. – danijar Jan 19 '12 at 19:22
  • According to your comment on the other answer, you got it to work *with a browser plugin* that *happens* to use Javascript. – ceejayoz Jan 19 '12 at 20:04