• Resolved qph9697

    (@qph9697)


    Hi, I am having an issue with google ads padding.

    I have tested some ads on GP theme and AMP pages, using the same ads plugin “adsforwp” on both.

    Here are the results,
    IMAGE 1
    https://ibb.co/QJNyjvf
    The above image is a desktop view of my page. Here I am using a responsive ad and it properly fits with the theme on desktop.

    IMAGE 2
    https://ibb.co/TbV0YW4
    Here, it is the same page in mobile view. I don’t know how but the ad is aligned to left. I checked in the plugin, I also ticked mark “centre” align given in the plugin. But it seems the CSS doesn’t have any effect.
    Due to this, it has lowered my user experience and also my ad revenue, as it is a bit annoying.

    IMAGE 3
    https://ibb.co/2MrK2Bp
    In order to crosscheck, whether this is the fault of a plugin. I added the same code, in an amp page. But there, it is properly padded, also the ad looks good.

    I tried with a lower size ad, but on GP theme, the ads are left-aligned but on an amp, paddings are perfect i.e. centre align.

    I don’t know why is this issue. I am using a responsive google ad, which automatically adjusts itself depending on the size of the screen.

    What I want is centred align.

    Please help me with this issue.

    Thank You.

    For Image 1 & 2: URL- https://questionpapershub.com/ecil-recruitment-2020-apply-online-engineers/
    (AMP is disabled for this page)

    For Image 3: URL- https://questionpapershub.com/drdo-recruitment-salary-80000-apply-online/amp/
    (AMP is enabled for this page) Please Note: for 2nd url, I have added amp at the end.

    • This topic was modified 4 years, 9 months ago by qph9697.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Tom

    (@edge22)

    Hi there,

    It seems like something is adding -30px of margin to the ad element: https://www.screencast.com/t/f3ocv29q8

    GeneratePress itself doesn’t/can’t do this by default. It might be worth checking with the plugin you’re using?

    Let me know ??

    Thread Starter qph9697

    (@qph9697)

    Hi,
    I looked into the plugin, but the settings are all okay.

    I tried something else, instead of using the plugin I manually used the “Custom HTML” block to directly paste the ad code.
    I also disabled the ad plugin and purged all the cache.

    I pasted the original ad code, which was

    <ins class=”adsbygoogle”
    style=”display:block”
    data-ad-client=”ca-pub-xxxxxxxxxxxx”
    data-ad-slot=”xxxxxxxxxx”
    data-ad-format=”auto”
    data-full-width-responsive=”true”>
    <script>
    (adsbygoogle = window.adsbygoogle || []).push({});
    </script>

    But, I don’t know how but it seems that extra “styles” were added automatically.

    transition: none 0s ease 0s;
    outline: none;
    border: none;
    padding: 0px;
    border-spacing: 0px;
    margin-left: -30px;
    width: 360px;
    z-index: 30;
    height: 300px;

    These are the extra styles.

    It seems that it was not the plugins issue, as it was happening even when I disabled it.

    Theme Author Tom

    (@edge22)

    I’m not sure what could be causing that.

    You could try overriding it with some CSS:

    .adsbygoogle {
        margin-left: 0 !important;
    }
    Thread Starter qph9697

    (@qph9697)

    Yes, the CSS worked.

    I will still look into why this extra style is added, and let you know if I find something.

    Thank You Again, Tom. ??

    Theme Author Tom

    (@edge22)

    No problem! ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Serious Issue with GP Theme Padding’ is closed to new replies.