- This topic has 7 replies, 3 voices, and was last updated 5 years, 3 months ago by
David.
-
AuthorPosts
-
December 14, 2020 at 12:23 pm #1580580
ken
Hi,
I would like to fix an additional footer at the bottom for the mobile site. I read the footer document but couldn’t find what I need. Could you help me out here?
I have created a widget for it but don’t know how to add an additional footer only to the mobile and also fix the position at the bottom as in it’ll always be visible. Maybe something like
position:absolute; bottom:0px;.This is the site I would like to have the footer fixed at the bottom.
Thanks!
December 14, 2020 at 4:39 pm #1580768Ying
StaffCustomer SupportHi Ken,
Just to make sure that you want the “Follow us” widget to be sticky to the bottom on mobile?
Let me know 🙂December 15, 2020 at 6:54 am #1581585ken
Hi Ying,
Not sure what you mean by “Follow us” widget, but what I want is a bar that is sticky to the bottom and in the middle of the bar there’s an icon that links to a page. Just like the mobile menu but without the menu and on the bottom instead of above.
Thanks!
December 15, 2020 at 8:39 am #1581738David
StaffCustomer SupportHi there,
you can create a new Block Element:
https://docs.generatepress.com/article/block-element-overview/
1. Use GenerateBlocks Container Block to create the Bar, and add what other buttons etc you need to it.
2. Select the Container Block and in settings > Advanced > Additional CSS Class(es) add 2 clases:
sticky-footer hide-on-desktop3. Then in the Element settings leave the Block Type as Hook
4. In the Hook field selectgenerate_after_footer
5. Set the Display Rules toEntire Siteor wherever you want it displayed.Once thats done you should see your custom footer bar on the page.
Now we need to add some CSS:@media(max-width: 768px) { body { margin-bottom: 80px; /* adjust this to the height of the custom footer */ } .sticky-footer{ position: fixed; bottom: 0; left: 0; right: 0; } }December 15, 2020 at 12:11 pm #1581985ken
Hi there,
Thanks! Most of the things work, the only thing I am struggling with right now is the class deosn’t seem to be working, both
hide-on-desktopandsticky-footer, I added the class but it doesn’t do the trick. Could you help me out here?December 15, 2020 at 4:31 pm #1582196David
StaffCustomer SupportOops couple of things:
1. I made a typo in the CSS above – updated here
2. You need to select the Container Block and add thesticky-footer hide-on-desktopclasses, currently you have them applied to the Image Block.December 15, 2020 at 11:28 pm #1582443ken
Works now, thanks!
December 16, 2020 at 1:17 am #1582527David
StaffCustomer SupportGlad to be of help!
-
AuthorPosts
- You must be logged in to reply to this topic.