How to remove the yellow background from Google Adsense Ads

You know what to do.

How to remove the yellow background from Google Adsense Ads

When using responsive Google Ads, if the ad being delivered is smaller than the container that houses it, oftentimes there is a background color; usually a pale yellow color.  This can ruin an otherwise attractive website.

google ads with and without yellow background
On the left, google ad has the standard yellow background. On the right, the background has been made transparent.

To get rid of this background, you simply need to make the background color transparent.  If you're using WordPress, simply open your Customizer panel, and in the Additional CSS box, add the following CSS code:

ins.adsbygoogle {background: transparent !important;}

Of course, if you're not using WordPress, just add that to your CSS.

You may want to add margins here too, just to give yourself a little more space around the ad. Padding doesn't work around all sides, but I set my margins to 10px (all around), and it works perfectly.

Do you have other questions about website design?  If so, ask here:  Ask a Question

You know what to do.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to top