How to remove the background from Google Ads by Bas Wijdenes

Google Adsense Ads and their default background ‘ins’.

When you implement Google Adsense ads in your website Adsense gives a number of css values ​​to the advertisements.
One of these values ​​is ‘ins’, ins sets the background-color for the ad blocks. Ins means ‘insterted’. Most CMSes such as WordPress have a default background color for ins, so that is the yellow background. That’s why your Google ads have a yellow background.


If the yellow background is default, then how do I can change it?

You can change the background by defining the background in your CSS file. In WordPress you can often create a child theme and use a custom CSS file. Keep in mind that if you do not use a child theme in WordPress, the settings can be removed when updating WordPress.

For now I assume that you know what a CSS file is and how you can adjust it, if not you will have to google it.

You can define File Ins in this way and adjust the background. The background will become white(#FFFFFF) and Text-Decoration will be removed as well.

Ins {Background:#FFFFFF; Text-decoration:none;}

To make the background transparent, you can simply type in transparent instead of #FFFFFF for white.

Ins {Background:transparent; Text-decoration:none;}

To give you a little extra, you can now also change more. For example, you can add a border, or adjust the style of it.

Ins {
Background:transparent; 
Text-decoration:none;
Border-style:2px #888888;
}

WordPress as CMS and Google Adsense.

You see the yellow background because WordPress uses the yellow background for ins. It often takes a while before the ad is loaded and therefore you see a yellow block.


Summary

I have reviewed this blog post and I no longer think that the content is very relevant, but because this post has been popular and some may still see yellow backgrounds when an Ad doesn’t load, I keep the blog post for now.

Published by

Bas

My name is Bas Wijdenes and I work full-time as a Services Engineer. In my spare time I write about the error messages that I encounter during my work. Furthermore, I am currently occupied with Office 365, Azure infra, and PowerShell for automating daily tasks.

Leave a Reply

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