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.

Related Posts

  • WordPress, SSL, And HTTPS Using Let’s Encrypt With Google search rankings being knocked down for regular HTTP sites, and WordPress announcing that sometime this year features would require HTTPS, I recently decided to look into […]
  • Google Chromecast I recently purchased a Google Chromecast as part of my plan to cut the cable cord. I'm impressed so far on how simple it is to use and the quality it can push across to your TV. Honestly […]
  • Samsung Galaxy S4 YES! I can finally throw out my 4-year-old piece of shit HTC Thunderbolt. LOOOONG overdue for this new phone. It's amazing how I can press an app and have it open in less than a second, […]
  • Secure Passwords & Two-Factor Authentication In this day and age everyone needs to stop using simple passwords and the same password for every site. You may find it annoying to remember complex passwords, but it will be even more […]
  • First Post From My New Chromebook! My new Chromebook just came in today! This is the first of many posts from this device. So happy I finally have something that I can sit here on the couch with my lady and do work at the […]
  • Just Bought A Samsung Chromebook I have been bouncing back and forth between buying a regular laptop, a Chromebook, or a tablet. I just cannot stand not being able to use a laptop without having it plugged in, or having […]