• Resolved jpen365

    (@jpen365)


    I’m using the plugin on a website with near-white background (#fcfcfc). All pages are full-width and I’ve used the plugin to add a couple of full-width ad spots on each page and post. Ads are being served by Adsense.

    I’ve noticed that if Adsense serves up an add that doesn’t take up the entire width of the iframe that the extra space is a tan color. Try as I might with developer tools, I can’t figure out which element to control with CSS to change the background to match the background color of the website.

    Is there an easy fix here, or is it just a matter of Google determining the background color, and it not being something I can adjust?

    See this page for an example (note that sometimes Adsense does serve up an ad that takes up the full width, so you may or may not be able to see the problem): https://www.introtopumps.com/pump-fundamentals/pump-terms/

    https://www.ads-software.com/plugins/quick-adsense-reloaded/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Google is using the ins tag to wrap adsense ads. You can change the background color or remove it from a regular non responsive adsense ad with the custom css:

    ins {
    background-color:#ccc !important;
    }

    If the ad is a responsive ad remove the AdSense background color with the css:

    ins {
    background: transparent !important;
    text-decoration: none;
    }

    If you want to change the adsense background color:

    ins {
    background: #cccc !important;
    text-decoration: none;
    }
    Thread Starter jpen365

    (@jpen365)

    Thanks. Great plugin. Will give 5 star review momentarily.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change iframe background color’ is closed to new replies.