- This topic has 6 replies, 2 voices, and was last updated 4 years, 5 months ago by
Tom.
-
AuthorPosts
-
September 29, 2016 at 8:27 am #230324
dasigna
hi again,
i am facing something that i couldnt solve up to now…
short explanation:
having main menu below header (logo), menu centered.
now, when scrolling up and the sticky header fading in, i would have two things happen for the main menu in sticky header: first it should align to the right (at the moment it centeres in the remaing space on the right side of the logo), second i would have the padding reduced for the menu items (only in sticky state!).pity me, but fiddling around for quite some time already and dont seem to be able to find the matching selectors… any clue anyone? … even possible so far?
thanks for some light in the dark in advance π
September 29, 2016 at 9:35 am #230350Tom
Lead DeveloperLead DeveloperHi there,
The menu should keep whatever alignment it has set when it sticks, that shouldn’t change.
Are you saying you want the menu items to align right only when sticky?
As for the height when sticky, this CSS should help:
.main-navigation.navigation-clone .main-nav ul li a { line-height: 40px; } .main-navigation .sticky-logo, .main-navigation .sticky-logo img { height: 20px; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 29, 2016 at 9:55 am #230368dasigna
Are you saying you want the menu items to align right only when sticky?
yep. π
that seems to do the trick:
.navigation-stick { text-align: right !important; }
… found no issues yet. (???)
but cant get padding decreased only for that purpose till now …sticky height is no issue – but thanks.
September 29, 2016 at 10:30 am #230377dasigna
crazy – found something π
.navigation-stick.main-navigation.navigation-clone .main-nav ul li a { padding-left: 10px; padding-right: 10px; }
… that reduces the space, that the nav-items occupy.
(only thing is that this way the right edge of the sticky-menue is a bit outside the content with bigger padding)do you see any issues with that?
September 29, 2016 at 10:47 am #230383Tom
Lead DeveloperLead DeveloperNo issues with that at all π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 29, 2016 at 10:54 am #230387dasigna
thx π
September 29, 2016 at 10:57 am #230390Tom
Lead DeveloperLead DeveloperNo problem π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.