Home › Forums › Support › “Float Navigation Logo Outside Container” in main-nav but not in sticky-nav
- This topic has 13 replies, 4 voices, and was last updated 7 months, 1 week ago by
Fernando.
-
AuthorPosts
-
August 16, 2022 at 10:09 am #2314827
Matthias
Team Generatepress / Generateblocks,
First big thanks for your great work and terrific support.
“Float Navigation Logo Outside Container” work in main – navigation, but the logo shrinks way too much in the sticky navigation, changing the “Menu Item Height” doesn’t help with the logo size.
I did try multiple css codes with no success. Is there a way to have the logo in sticky navigation fixed and not floating?My CSS:
.navigation-branding img {
position: absolute;
height: 120px;
top: 5px;
z-index: 10;
}August 16, 2022 at 10:14 am #2314833Ying
StaffCustomer SupportHi Matthias,
Try change your CSS to:
.inside-navigation img { position: absolute; height: 120px !important; top: 5px; z-index: 10; }
August 16, 2022 at 10:28 am #2314844Matthias
Thanks Ying,
This is great.
Another option is it possible to not floating the logo outside the container in the sticky navigation just floating the logo in main navigation.August 16, 2022 at 10:55 am #2314866Ying
StaffCustomer SupportHum…I’m not sure I understand what you are trying to achieve..
Can you show me a mockup?
Let me know!
August 16, 2022 at 11:51 am #2314919Matthias
Thanks Ying
Link to a quick mockup in the private information (don’t know how to post it here)
August 16, 2022 at 12:25 pm #2314943Leo
StaffCustomer SupportCan you try this CSS?
.main-navigation:not(.navigation-stick) .navigation-branding img { position: absolute; height: 120px; top: 5px; z-index: 10; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 16, 2022 at 12:44 pm #2314952Matthias
Thanks Leo,
I will test it laterAugust 16, 2022 at 12:55 pm #2314963Leo
StaffCustomer SupportSounds good.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 16, 2022 at 2:32 pm #2315024Matthias
Thanks Leo,
But the logo shrinks way too small like it did before Yings CSS change.
See images uploaded.August 16, 2022 at 3:32 pm #2315048Leo
StaffCustomer SupportSo what is the ideal solution you are after?
Perhaps you can try increasing the sticky navigation menu item height?
https://docs.generatepress.com/article/sticky-navigation/#menu-item-heightDocumentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 16, 2022 at 8:49 pm #2315145Matthias
Thanks Leo,
No, increasing the menu item height doesn’t work, the logo is still too small, compared to the logo when used in sticky menu without “Float Navigation Logo Outside Container”.
Ying’s recommended CSS changes works fine for now.
See link in “Private information” for an ideal solution.
August 16, 2022 at 9:11 pm #2315159Fernando Customer Support
Hi Matthias,
You can try something like this instead:
.main-navigation:not(.navigation-stick) .navigation-branding img { position: absolute; height: 120px; top: 5px; z-index: 10; } .main-navigation.navigation-stick .navigation-branding img { height: 60px; padding: 0; }
August 16, 2022 at 9:25 pm #2315166Matthias
Fernando,
Thank you, perfect looks great on desktop.
August 16, 2022 at 9:51 pm #2315176Fernando Customer Support
You’re welcome Matthias!
-
AuthorPosts
- You must be logged in to reply to this topic.