- This topic has 13 replies, 2 voices, and was last updated 3 years, 7 months ago by
Ying.
-
AuthorPosts
-
September 22, 2022 at 9:16 am #2350828
Terry
I originally set up a primary menu, named primary. Then, I decided to make it a secondary menu. The site logo now appears in the secondary menu, as you can see at https://cttt.it4causeshosting.org/. I’ve applied the css that you suggest for a center logo in the navbar, and I think that’s what I need to change, but I’m not sure-can you show me what to change?
September 22, 2022 at 10:57 am #2350927Ying
StaffCustomer SupportHi Terry,
In your case, I would suggest:
1. Go to customizer > layout > secondary navigation > navigation location, choose
below header.2. Go to customizer > layout > primary navigation > navigation location, choose
float right.Let me know if this works.
September 22, 2022 at 12:56 pm #2350997Terry
That’s essentially what I’ve done, except putting the secondary menu below the header actually places it below the hero image.
September 22, 2022 at 1:03 pm #2351001Ying
StaffCustomer SupportCan you do what I suggested and let me have a look again?
September 22, 2022 at 1:23 pm #2351014Terry
That helped the logo problem, although it still looks a little weird when acrolling down. But, the secondary menu is below the hearder image, and I want it between the primary navbar and the hero image.
September 22, 2022 at 1:26 pm #2351017Ying
StaffCustomer SupportAre you using a block element for the page hero?
If so, can you try changing the element’s priority to
20?
https://www.screencast.com/t/iW7ow3sxSeptember 22, 2022 at 1:36 pm #2351026Terry
Bingo. But the secondary menu disappears if I scroll down.
September 22, 2022 at 1:45 pm #2351044Ying
StaffCustomer SupportYes, because secondary navigation is not sticky, it will scroll up like other elements on your site.
If you want it to be sticky with the primary navigation, try add this CSS:
@media (min-width: 769px) { nav#secondary-navigation { position: sticky; top: 150px; } }September 22, 2022 at 1:54 pm #2351053Terry
That didn’t seem to work.
September 22, 2022 at 3:59 pm #2351105Ying
StaffCustomer SupportIt is sticky now, but your site header height changes too much.
When this sticky primary navigation is active, the header height is 150px, and my CSS works well.
https://www.screencast.com/t/jyUjGKBulGuBut when sticky primary navigation is not active, the header height is only 79px, but the secondary navigation is still at the 150px:
https://www.screencast.com/t/rgWvRi0CDbTo solve this issue, we need to make the site header same height, no matter it’s sticky or not.
In order to do so, can you go to customizer > header, and enable the
use navigation as header option?September 23, 2022 at 6:43 am #2351606Terry
Ok, did that, now how to adjust position?
September 23, 2022 at 11:19 am #2351905Ying
StaffCustomer SupportTry change the CSS I provided here to this:
@media (min-width: 769px) .navigation-clone + .secondary-navigation { position: sticky; top: 65px; } }The value 65px is to match what you set at customizer > layout > sticky navigation > Menu Item Height.
September 23, 2022 at 11:47 am #2351933Terry
Doesn’t seem to help.
September 23, 2022 at 12:28 pm #2351962Ying
StaffCustomer SupportSo what’s the issue now? The logo on non-sticky navigation doesn’t fully show?
If that’s the issue, it’s because you’ve set the menu item line-height to 35px using this CSS in your child theme’s style.css:
@media (min-width: 769px) .main-navigation .main-nav ul li a { background-color: #ffffff; border: 2px solid #000000; color: #000000; line-height: 35px; }Try remove the
line-height: 35px;from the CSS. -
AuthorPosts
- You must be logged in to reply to this topic.