Site logo

Archived topic

Search alignment

7 replies · Started by Raielene on June 10, 2019

Viewing posts 1–8 of 8

I'm working on a site and have made the navigation a little taller than usual. I added the search to the main navigation but it's small and stuck to the top of the horizontal bar. If I try to use CSS to move it down, it looks great on desktop but is too low on mobile. Obviously, I want it in the middle for both.

Speaking of mobile... even without this CSS hack, there's a second bar that appears in the mobile menu. The search is there to the right, but it's also in another bar below my menu items. ??

GP and Max Mega Menu are both already set to 60px.

I've purged all caches and disabled LiteSpeed. Second search is still there.

🤷‍♀️

For sure deactivated. Can you check again?

Try adding this CSS:

.main-navigation li.search-item {
    line-height: 60px;
}

And this should hide the second one on mobile:

@media (max-width: 768px) {
    .main-navigation li.search-item {
        display: none;
    }
}

Adding CSS: https://docs.generatepress.com/article/adding-css/

Perfect! Thanks Leo!

No problem :)

This archived topic is closed to new replies.