Nov 17 2008

Adsense ads with transparent background?

Filed under: Publishing » Adsense, Technology » Google,
Tools:

Is it possible to make the background of an Adsense ad transparent?

Yes, it's possible, but we don't recommend it as it may prove to be a violation of your Google Adsense user agreement (or TOS = Terms of Service). Instead, we'll point out several benefits to using solid colors as your Adsense background. But first, for the technically curious, here's how to change the background color of an existing HTML element using CSS. You would simply wrap the element you wish to modify in the following div.

Replace an existing background color

<div style="width: #px; filter: chroma (color=#ffffff)"> ... </div>

This code snippet replaces the color in the chroma setting and makes it transparent. So if you have your background-color set to #ffffff (white), it will be made transparent. Not that while this method works in IE, it does not work in all browsers. And we want to point out again that it's probably not a good idea to try this out on your Adsense code.

Delete an existing background color

A more direct way of making the background color of an Adsense ad transparent is to delete the BGC (Back Ground Color) value. Be deleting it, the background becomes transparent. Since by doing this, however, you are changing the Adsense code, you are definitely not going to make Google happy.

Why does Google not allow transparent backgrounds in Adsense ads?

We can only surmise a guess on this one. But I would have to say it's probably because the ads need to be clearly visible. By making the background color transparent, there's no sure fire way of telling how visible the ad text will be. The more varied and complex the background is, the more difficult it will be to see the ad text. Since the composition of non-solid backgrounds is rather subjective, there was probably no certain way for Google to allow transparent Adsense backgrounds and still guarantee the integrity of their ads for their advertisers.

Use solid colors instead

You might be set on the whole transparent background thing, and might actually have a situation where it looks quite good. But the bottom line is you don't want to risk having your Adsense account suspended. Instead, we'd like to point out the advantages of using solid colors for your ad backgrounds.

  • Solid colors pop more, and make the Adsense text more visible.
  • If you want to blend your ads, you can choose an Adsense background color that matches the background color of your website.
  • In some instances, you may actually want to vary the background color of your Adsense ad, as it will make it stand out from the rest of your site content.

See below for more articles that cover this topic. And remember, it's not worth tinkering with the Adsense code. Use your creativity and find a way to play within the rules. You'll be rewarded for your efforts.

Average: 5 (2 votes)
Select your preferred way to display the comments and click "Save settings" to activate your changes.

You can modify any code

You can modify any code around the ad any way you like. The only code you're not allowed to modify is the Adsense code itself.

Adsense Beta

I noticed that Google is letting some of their users test their new beta version of Adsense. Can anyone report back (I'm unable to access the beta) as to the improvements in color choices for ads? Ie. is there a way to add a transparent background color to ads now?

Changing Adsense background colors

I'm not sure I understand how changing the background color in Adsense violates their TOS? You'll notice that the popular SourceForge.net site uses a gradient background for their Adsense ads.

Source Forge Adsense background

It violates TOS because they say not to mess with the code fragment or look of the ads. Changing the background color does one or the other of these. I'm not saying I agree with them - I think a decent designer can make the ads look a heck of a lot more appealing than Google is allowing them to by default.

That being said, I checked out the Source Forge site. The pages I viewed the background color was white (no gradient), and it didn't appear as if they had changed the layout or look of their Adsense ads. Could you specify what page you're referring to?

Not Source Forge, but rather...

I'm making a logical assumption that he did not mean Source Forge (which uses a white theme), but rather Fresh Meat (www.freshmeat.net). Freshmeat uses Adsense ads on a gradient background. While I have been able to duplicate their technique, I am not sure if this violates the Adsense TOS for sure, so instead chose to use solid colors on my own websites for now.

There are some cases where I have a slightly textured background, and having the ad 'blend' better with it would improve the overall look and feel of the website.

  • Allowed HTML tags: <a> <em> <strong> <cite> <ul> <ol> <li> <dl> <dt> <dd><u>
  • Lines and paragraphs break automatically.
  • Textual smileys will be replaced with graphical ones.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.