Once in a while, I receive a question asking how to remove the (often yellow) background of AdSense ads. This is simple, so let me show you the solution.

Why is there a background color?

This is how the problematic ad might look like:

AdSense with yellow background

The reason for the (yellow) background is simply that AdSense displays an ad that is actually smaller than the space you defined for the ad. This often happens with responsive ad units, but sometimes AdSense also displays smaller creatives within larger fixed ad spaces.

The background color doesn’t come from AdSense or any plugin but from your theme. The “typical” yellow you see in the example above or any other color is the background color set by some of the standard WordPress themes for the <ins>  tag.

This tag is not very common, but AdSense loads the ad into this element. Since it is not used very often most theme developers and users don’t know how it is formatted.

How to fix it without coding?

As a user of our Advanced Ads plugin you can just go to Advanced Ads > Settings > AdSense and click on the Transparent background option. The background of your AdSense ads will now be transparent.

Transparent AdSense background option

How to remove the background with Custom CSS?

If you are not a user of Advanced Ads then you can add the following CSS rule in your theme options or style.css:

This makes the background color transparent like this:

AdSense ad with transparent background

A brute force method would also be to not use responsive ads at all, but this is not recommended for most websites nowadays.

Fixing a border around AdSense ads

The option described above also fixes an issue where the theme puts a border around AdSense ads.