- This topic has 15 replies, 3 voices, and was last updated 4 months, 1 week ago by Leo.
October 19, 2020 at 5:08 am #1495359fragbenny
Hey there, i wanted to know if its possible to show a floating (fixed) Call-to-Action Button after the Page-Hero. This is my website –> https://fragbenny.de/
Thank you in advance!October 19, 2020 at 6:42 am #1495458DavidStaffCustomer Support
you can use a Block Element with the
generate_after_headerhook:October 19, 2020 at 8:36 am #1495752fragbenny
Hey David, thanks for your answer. I’ve made a new block with the hook above but it isn’t working as expected. I think i have to change it from position: fixed to sticky?
Here is the relevant CSS for the Button:
transition: all 0.1s ease-in-out;
At the end the button should be appear after the page-hero and it should be fixed to the bottom right.
Thanks for your help!October 19, 2020 at 9:31 am #1495845LeoStaffCustomer SupportOctober 19, 2020 at 9:57 am #1495892fragbenny
It is. At the right bottom there is a fixed orange button.October 19, 2020 at 11:21 am #1496010LeoStaffCustomer SupportOctober 19, 2020 at 11:31 am #1496017fragbenny
I wanted it to be over the content area and footer but not hovering over the page-hero.October 19, 2020 at 12:26 pm #1496091LeoStaffCustomer SupportOctober 19, 2020 at 12:37 pm #1496100fragbenny
Yes, exactly. Maybe if the button is in the content area and with position:sticky?October 19, 2020 at 12:50 pm #1496121LeoStaffCustomer Support
That case you can try the
generate_inside_container hook and see if you can make it work with
https://docs.generatepress.com/article/hooks-visual-guide/October 19, 2020 at 12:52 pm #1496124fragbenny
I’ve tried it with z-index: -1; but then it’s half under the content area but not shown under the page-hero (which would be perfect without the other problem).October 19, 2020 at 1:08 pm #1496152LeoStaffCustomer SupportOctober 19, 2020 at 1:10 pm #1496155fragbenny
Leo, i’ve tried this already but it wasnt working. I stuck next under the page-hero and moved a bit but not as expected.October 19, 2020 at 1:18 pm #1496172fragbenny
Thanks LeoOctober 20, 2020 at 12:41 am #1496537fragbenny
Works perfect Leo. This is what i was looking for!
- You must be logged in to reply to this topic.