- This topic has 16 replies, 2 voices, and was last updated 3 years, 2 months ago by
Ying.
-
AuthorPosts
-
January 30, 2023 at 7:33 am #2514127
wo
Hi all, I love GPP, but it’s always been a complicated relationship with your Sticky Headers. For this site
I have actually managed to really stick the header, one for all pages and all media. Now, refreshing my own site
I’m stuck in the middle. I want this header stick exactly as it sticks on the first site. Just different colors etc.
What is the secret?
Thanks in advance
WolframJanuary 30, 2023 at 10:09 am #2514476Ying
StaffCustomer SupportHi Wolfram,
If you don’t need an animation, you can just use CSS to make the header/navigation sticky without enabling the GP sticky navigation.
So can you disable GP’s sticky navigation for now?
One question, why the non-stick navigation background color is set to white not blue?
January 30, 2023 at 10:23 am #2514492wo
Hey Ying,
thank you. Sticky nav is OFF now.
I’m completely honest with you, I have no idea at all, why this white is not blue. Of course, my plan is to have a fixed header, under all scrolling circumstances, color: white, background: blue.
I hope you can help me out. With some magic lines of CSS ๐
January 30, 2023 at 11:29 am #2514545wo
Meanwhile, I applied Customize > Color > Header > Background: Blue.
No effect.
My logo is still there. White on white. Sophisticated ๐
Navigation text gets blue on hover, at least.
My problem is, I have really no idea, how this can be fixed. Relevant settings seem to be scattered all over the place.
January 30, 2023 at 12:02 pm #2514583Ying
StaffCustomer SupportMeanwhile, I applied Customize > Color > Header > Background: Blue.
As you are using
navigation as headeroption, so there’s no header on your site.The colour option would be at Customize > Color > Primary navigation > Backgrounds.
Once the background color is set, you can add this CSS to make it sticky:
nav#site-navigation { position: sticky; top: 0; }January 30, 2023 at 12:22 pm #2514607wo
You are so right. Marvelous!
So there is just one issue yet. I am struggling with the responsive positioning of the logo in the upper left corner. My stupid CSS
.sticky-navigation-logo {
margin-left: 125px;
}is roughly approximating, what I’d like to see on all viewports: desktop, pad, phone.
Do I have to work it out with @media etc. or is there a shortcut?
Perfect, if the logo is left aligned with the content, under all screen circumstances.
January 30, 2023 at 12:31 pm #2514622Ying
StaffCustomer SupportBased on your design, I would recommend disabling the mobile header option at customizer > layout > header.
Can you do that first and let me know ๐
January 30, 2023 at 1:28 pm #2514680wo
Ok. Layout > Header > Sticky is OFF.
January 30, 2023 at 1:32 pm #2514685Ying
StaffCustomer SupportI mean: customizer> layout > header > mobile header > off.
January 30, 2023 at 2:05 pm #2514709wo
Sorry. Got it. Done.
January 30, 2023 at 2:31 pm #2514723Ying
StaffCustomer SupportNow can you go to customizer > layout > primary navigation > Menu Item Height, click the mobile icon and set the value to 60px instead of 20px?
let me know!
January 30, 2023 at 2:39 pm #2514726wo
Awesome. 60px is too much. I reduced to 40px. Looks great.
Now, finally: this header should work for any page on the site. That’s not the case. What did I wrong?
January 30, 2023 at 3:37 pm #2514767Ying
StaffCustomer Supportthis header should work for any page on the site
Yes ๐
So it’s all good now?
Let me know if there’s any other issue related to this topic.
January 31, 2023 at 1:55 am #2515192wo
It’s endless … you know it better than me ๐
To finish this topic, last question: the logo sticks to the right.
Please give me a clue, how it can be left-aligned with the content underneath.
January 31, 2023 at 1:55 am #2515193wo
I mean, the logo sticks to the left – just in case you didnt see it by yourself ๐
-
AuthorPosts
- You must be logged in to reply to this topic.