Site logo

Archived topic

Search bar in middle menu

3 replies · Started by Veronica on July 29, 2020

Viewing posts 1–4 of 4

Good afternoon: I want to get insert the search bar in the menu, in the middle, between the item category and user, here is the example. I have tried applying CSS but don't have much knowledge.
The code that so far tempted additional to the one that generatepress gives us is the following.

.inside-header { display: flex;border-bottom: 2px solid red}

input[type=text] {border-radius:20px}

/*Order item del menu*/
nav{margin-top:30px; flex-grow:1}

ul#menu-principal {display:flex; flex-grow:1}
li#menu-item-29{order:1;}
li#menu-item-30{order:3;margin-left:auto}
li.search-item{order:2;}
li.wc-menu-item{order:4;}


null

Please how could I insert in the middle? Thank you

Hi there,

try this CSS:

@media(min-width: 800px) {
    .custom-search {
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
    }
}

Hello

Thank David. It very good, I already set it to mobile and that's it.

Glad to be of help

This archived topic is closed to new replies.