- This topic has 7 replies, 4 voices, and was last updated 4 months, 3 weeks ago by
Leo.
-
AuthorPosts
-
August 14, 2020 at 5:07 am #1402430
Darren
Is there a way to have the whole header, including widgets, logo and navigation bar to be made stick. as I want my book now button to scroll with the page.
August 14, 2020 at 5:36 am #1402476David
StaffCustomer SupportHi there,
it is possible with some code. But your Book Now Button is not part of the site header.
And you have to be mindful that making = your top bar, header, navigation and button sticky would occupy a lot of screen space when a user scrolls. For smaller laptop users that could be more than a 3rd of their screen taken up.My suggestion would be make your Main Navigation full width and include the Button inside the nav. This article explains how to make a menu item behave like a button:
https://docs.generatepress.com/article/adding-buttons-navigation/
You can then enable Sticky Navigation add a logo to it.
Any good ?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 21, 2020 at 7:29 am #1412630Darren
Thank you this works great on the desk top Is there a way to get the button sticky on mobile so the call to action is on mobile too.
August 21, 2020 at 3:08 pm #1413259Tom
Lead DeveloperLead DeveloperHi there,
Thankfully, this will be much easier in GP 3.0.
For now, your sticky navigation is only a button, so there’s no way to insert another button into it.
Perhaps the Mobile Header feature is worth looking into? Then you could do this:
1. Create a Hook Element:
2. Add your button to the element:<a class="hide-on-desktop hide-on-tablet button" href="URL HERE">My button</a>
3. Choose the
generate_inside_mobile_header
hook.
4. Set your Display Rules.Let us know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 25, 2020 at 2:43 am #1417158Darren
Thanks all, I think I am getting there, last question is there a way of adding a hover effect to the button on the Navigation bar, all I want to do it was it change background colour to a brown and text to white when someone hovers over the button.
August 25, 2020 at 8:42 am #1417667Leo
StaffCustomer SupportTry adding this additional CSS:
@media (min-width: 769px) { .main-navigation .main-nav ul li.Book-now a:hover { background-color: #000; color: #fff; } }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 27, 2020 at 4:04 am #1420135Darren
Thank You all Working
August 27, 2020 at 8:26 am #1420670Leo
StaffCustomer SupportNo problem π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.