Archived topic
how to make top bar block hook sticky
3 replies · Started by Michael on March 7, 2022
Hi, im trying to make my top bar block hook (before header) and Header sticky.
with header i have set in apearance->customize->layout->sticky navigation , and i have no problem there
but for the top bar, i try to copy the aditional css from other suport post here,
but when i scroll down the live website, there is gap between top bar and header.
this is the script i copied:
#sticky-navigation,
#mobile-header.is_stuck {
top: 50px !important;
}
/* adjust position when admin bar is shown */
.admin-bar #sticky-navigation,
.admin-bar #mobile-header.is_stuck {
top: 50px !important;
}
.sticky {
position: -webkit-sticky; /* Safari */
position: sticky;
top: 0;
z-index: 100;
}
GeneratePress Version: 3.1.3
GP Premium version: 2.1.2
Hi Michael,
The space here: https://share.getcloudapp.com/6quZ9lb7 seems to be coming from a Paragraph Block.
See: https://share.getcloudapp.com/5zuLWEjA
Kindly check your Block Element and see if there is an extra Paragraph Block with no text.
Example: https://share.getcloudapp.com/NQuNO0pe
When I scroll down however, I don’t see this spacing: https://share.getcloudapp.com/z8uLpjR0
Can you remove the Paragraph Block first and clear any caching mechanisms set in place in your website?
Perhaps you're referring to a different spacing? Maybe you can send a screenshot of the issue from your end.
https://docs.generatepress.com/article/using-the-premium-support-forum/#uploading-screenshots
Kindly let us know. :)
it is the paragraph block that make spacing in live websites, thank you for your support 😊🙏
You’re welcome Michael! Glad to be of assistance. Feel free to reach out anytime if you’ll need assistance with anything else. :)