Archived topic
How to create sticky footer using hook element to show google adsense ads
11 replies · Started by surendra1506 on October 2, 2022
Hi team,
I am using
Hi team,
I am using
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?
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.
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%);
}
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.
The class ad-footer hasn't been added yet. See: https://share.getcloudapp.com/5zuPnEmo
Can you try clearing cache?
Hi Fernando,
I implemented the ad-footer div class and its showing on my end in inspect element also.
Request confirm the same.
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.
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?
Thank you Fernando
I figured out what you said and implemented the same.
I had god my desired output.
Thanks a lot
I see. You're welcome Surendra!