[Resolved] How to create sticky footer using hook element to show google adsense ads

Home Forums Support [Resolved] How to create sticky footer using hook element to show google adsense ads

Home Forums Support How to create sticky footer using hook element to show google adsense ads

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #2361022
    surendra1506

    Hi team,

    I am using

    class to show ads on mobile view of my site classmate4u.com.

    Along with the CSS:-

    .custom-ad-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    height: fit-content;
    }
    .custom-ad-container ins.adsbygoogle {
    display: block !important;
    }

    I had achieved the desired outcome on mobile view.

    But for Desktop view, I am using 728 * 90 ad unit of google Adsense. It is showing at the bottom but the ad is appearing on the left side and

    Also, it is not sticky to the bottom.

    My only requirement is to make an ad of 728*90 size to the center and sticky for desktop view.
    Thanks in Advance

    #2361023
    surendra1506

    Hi team,

    I am using

    class to show ads on mobile view of my site classmate4u.com.

    Along with the CSS:-

    .custom-ad-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: fit-content;
    height: fit-content;
    }
    .custom-ad-container ins.adsbygoogle {
    display: block !important;
    }

    I had achieved the desired outcome on mobile view.

    But for Desktop view, I am using 728 * 90 ad unit of google Adsense. It is showing at the bottom but the ad is appearing on the left side and

    Also, it is not sticky to the bottom.

    My only requirement is to make an ad of 728*90 size to the center and sticky for desktop view.
    Thanks in Advance

    #2361045
    Fernando
    Customer Support

    Hi Surendra,

    For reference, can you provide the link to the site in question?

    Can you also try hooking the ad to after_footer if you’re using a Block or Hook Element?

    #2361054
    surendra1506

    Hi Fernando,

    Thanks for your reply.

    The site I am talking about is https://www.classmate4u.com/

    Also, I am using the after_footer hook element.

    The only requirement I want is to make it center and sticky.

    #2361083
    Fernando
    Customer Support

    Try adding ad-footer to the class list of the div holding the ad. It currently has custom-ad-container class, just add it after that.

    Then, add this in Additional CSS:

    .grid-container.custom-ad-container.ad-footer {
        position: fixed;
        bottom:0;
        left: 50%;
        transform:translateX(-50%);
    }
    #2361105
    surendra1506

    Hi, Fernando,

    I implemented the Div Class ad-footer on both the mobile div class and desktop div class along with the CSS you had given.

    But it’s not working on the Desktop view. The mobile view is fine.

    #2361110
    Fernando
    Customer Support

    The class ad-footer hasn’t been added yet. See: https://share.getcloudapp.com/5zuPnEmo

    Can you try clearing cache?

    #2361180
    surendra1506

    Hi Fernando,

    I implemented the ad-footer div class and its showing on my end in inspect element also.

    Request confirm the same.

    #2361200
    Fernando
    Customer Support

    It’s now there.

    However, you added the CSS code I provided inside a media query for mobile.

    You’ll need to put it out of the media query for it to work on Desktop as well.

    #2361220
    surendra1506

    I don’t understand what you said sorry for that.

    Can you simplify it for me?

    I am not a technical person.

    What exactly do I need to implement?

    #2361225
    surendra1506

    Thank you Fernando

    I figured out what you said and implemented the same.

    I had god my desired output.

    Thanks a lot

    #2362067
    Fernando
    Customer Support

    I see. You’re welcome Surendra!

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.