How to remove the unwanted background from adsense ads

remove the unwanted background from adsense ads

Are you seeing unwanted background in your adsense ads in your wordpress site? Do you want to remove the unwanted background from adsense ads? You are not alone. And I recently found a solution when having the same problem.

When I first added adsense ads on this blog, I saw that there were unwanted brown background behind the adsense ads. They were really ugly and were making my blog ugly too. I had to remove the unwanted background from adsense ads. So I started looking around and finally found the culprit.

It’s likely because of the default wordpress themes like twenty sixteen and previous themes.

Google uses a css class called ‘ins’ to style their ads. The default wordpress themes like twenty sixteen, twenty fifteen and others have pre defined the style for this class in the style.css .

This is how it looks like in the style.css file

ins {
 background: #007acc;  //This is the problematic style
 color: #fff;
 padding: 0.125em 0.25em;
 text-decoration: none;
}

The theme developers have done a terrible job in styling this. So you need to modify the style to remove the unwanted background from adsense ads.

Don’t worry. It’s a very simple process.

  1. Login to your wordpress dashboard and go to appearance -> editor.
  2. Now look for the style.css file in the right side and open it to edit it.
  3. In the style.css file, look for ‘.ins’ class which will look like the snippet shown above. When you find it, change ‘ background: #007acc; ‘ to ‘ background: none !important ‘. The new code should look like the code below :
    ins {
     background: none !important; //This code has been changed
     color: #fff;
     padding: 0.125em 0.25em;
     text-decoration: none;
    }

    Or you can simply copy paste the above code to replace the old one.

Now your adsense ads will not have any unwanted background.

You may also want to check out how to create a compelling homepage.

By Millo Lailang

I am a PHP/MySQL and wordpress developer and I write about it and other general webmaster and blogging tips on my blog rom-link.com. I also give free guitar lessons at http://www.mamamusicians.com

5 responses to “How to remove the unwanted background from adsense ads”

  1. SEO Services says:

    Awesome post! Keep up the great work! 🙂

  2. Great content! Super high-quality! Keep it up! 🙂

  3. Royal CBD says:

    Hi there! I simply wish to give you a big thumbs up
    for the excellent information you have got right here on this post.
    I’ll be coming back to your blog for more soon.

    P.S. If you have a minute, would love your feedback on my
    new website
    re-design. You can find it by searching for royal cbd _ no sweat if you can_t.

    Keep up the good work!

  4. There is noticeably a lot to identify about this. I think you made some good points in features also.

Leave a Reply

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