How To Remove Yellow Border Around Google Adsense Ads

After changing the blog theme tonight, I noticed some of the Google Adsense ads had a yellow border around them. I found out that Google may randomly send smaller ad units when you have some of the larger size units on your site, causing it to look like this.

Google Adsense ad

It took me a bit to figure out what was causing it to be yellow instead of the background.  After some digging I found it was caused by the asynchronous code that I was using from Google which uses the ins tag. My CSS sheet had a color code of #fff9c0 for ins tags. I was able to remedy the problem by adding the below code to my CSS sheet.

.adsbygoogle {
background: #FFF;
}

This sets the background for the specific adsbygoogle code to white, for my case. Replace #FFF with your color hex code of your background.

I hope this helps someone as it took me some time to figure it out. I wish I didn’t have to run ads, but websites aren’t free and I can use all the help I can to keep this project alive.