Remove Yellow Background from Google Adsense Adverts

Microsoft Dynamics GPI’ve been hosting adverts from Google Adsense for a while and, after my last site redesign, I started using responsive adverts which scale according to the size of the browser window (or device size).

Since then, I’ve had yellow background showing either side of the adverts:

Adverts with yellow bars

The other day, I finally had time to track down and fix the issue. The html code for the adverts, which is supplied by Google, places the adverts within an ins tag and a class of adsbygoogle (see two highlighted sections):

...<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
				<!-- azurecurve Responsive Leaderboard -->>
				<ins class="adsbygoogle"
					 style="display:block"
					 data-ad-client="{adsense publisher id}"
					 data-ad-slot="5299901990"
					 data-ad-format="auto"></ins>
				<script>
				(adsbygoogle = window.adsbygoogle || []).push({});
				</script>...

The yellow background is the default colour used by WordPress for ins tags; so to remove it, all you need is a snippet of css in your stylesheet:

ins.adsbygoogle {
	background: transparent;
}

With the css saved, the yellow background disappears:

New azurecurve|Ramblings of a Dynamics GP Consultant Theme Launched

As you can see, I have introduced a new theme on this site. Admittedly it is pretty similar to my last one (azure on white), but the previous one was based on the default 2010 WordPress theme which had become rather dated.

The new one gives me access to some new functionality and brings me up to date. I expect there to be some teething problems over the coming days as I find things that were done a certain way because of the previous theme and which will now look/work differently.

I have also taken the opportunity to remove certain elements from the theme and turn them into plugins (see the Posts Archive as an example although there are more to follow).

Please do let me know both what you think of the new theme and if you encounter any issues or peculiarities in how posts or other items are displayed.

azurecurve Twitter Archive Created

Apparently Twitter only allows you to download the last 3,200 posts you have made. While I am substantially short of this number at present, I thought it might be useful to keep an archive of these posts myself so I always had access to them.

The CMS I am most used to these days is WordPress and I recently came across a plugin and theme from Ozh which allows you to make an archive of your Twitter which looks like the new Twitter. This azurecurve Twitter Archive is now available; it has been themed to look very like my Twitter page but has all the functionality of WordPress.