- This topic has 18 replies, 2 voices, and was last updated 4 years, 3 months ago by
David.
-
AuthorPosts
-
February 21, 2022 at 9:24 am #2127856
Michael
hi,
I searched the forum that would allow me to have a sticky top bar instead of a sticky menu and none of the solutions seem to be working for me. https://aub.mayburyitsolutions.com/ is the demo site I am workgin on. Is there something I am missing? I have disabled the sticky menu from the customiser and have added the below and it wont work for me?
.top-bar {
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 99;
}
#site-navigation {
position: -webkit-sticky;
position: sticky;
top: 21px; /* This is the height of the top bar */
}February 21, 2022 at 10:05 am #2127919David
StaffCustomer SupportHi there,
the Top Bar is not the themes top bar, its a Block Element 🙂
Edit the Block Element that you have created the top bar and:
1. in the sidebar below where you set the Hook, is a Priority field, enter
0
2. select the parent Container Block and in Advanced > Additional CSS Class(es) add:top-barFebruary 21, 2022 at 10:47 am #2127961Michael
thats brilliant, thanks so much for the quick response
February 21, 2022 at 10:55 am #2127968Michael
sorry just a small thing but now on the site: https://aub.mayburyitsolutions.com/ there is a white gap between the top bar and the image/nav section. the setting of the ‘priority to 0 seems to be causing it. Is it possible to remove the space and yet maintain the top bar stickiness?
thanksFebruary 21, 2022 at 10:59 am #2127972David
StaffCustomer SupportEdit your Top Bar Block Element and below the parent Container Block you will see an Empty Text block, select that and Backspace Delete it – that will get rid of that space.
February 21, 2022 at 11:16 am #2127984Michael
genius, thank you. I am new to generatepress but so far am delighted with it and the fast support!
February 22, 2022 at 2:21 am #2128628David
StaffCustomer SupportHappy to hear that!
February 28, 2022 at 9:05 am #2136839Michael
Hi sorry but the client has changed their mind. On https://kbh.mayburyitsolutions.com/ they want the top bar and the navigation menu to be both sticky?
February 28, 2022 at 9:33 am #2136876David
StaffCustomer SupportI can’t see how that would work with that design, but if you want to enable the Customizer > Layout > Sticky Navigation we can take a look.
February 28, 2022 at 9:49 am #2136895Michael
hi, ok I’ve enabled that there, thanks
March 1, 2022 at 3:47 am #2137639David
StaffCustomer SupportI am not seeing the sticky nav enabled ?
March 1, 2022 at 3:50 am #2137647Michael
Hi, it is enabled but last week I was looking to have only the topbar stuck so you gave me the code below which I have removed just now. So I’d like to have the top bar sticky and the standard sticky bar as well underneath. is this possible?
.top-bar {
position: -webkit-sticky;
position: sticky;
top: 0;
z-index: 99;
}
#site-navigation{
position: -webkit-sticky;
position: sticky;
}March 1, 2022 at 4:22 am #2137692David
StaffCustomer SupportCan you enable the Customizer > Layout > Sticky Navigation option.
And remove this CSS:#site-navigation{ position: -webkit-sticky; position: sticky; }Once done – let me know so i can take a look at whether we can make the Theme sticky nav work with the top bar.
March 1, 2022 at 4:36 am #2137714Michael
ok that’s done now thanks
March 1, 2022 at 5:04 am #2137761David
StaffCustomer SupportDo you have any page caches enabled ? As i cannot see the Sticky Navigation on the site
-
AuthorPosts
- You must be logged in to reply to this topic.