- This topic has 17 replies, 3 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
March 1, 2023 at 1:38 am #2550973
Ivaylo
Hi, is it possible to make the mobile menu and search button in one line with the logo. On the left the menu and on the right the search. Also the menu to show only the three lines and not MENU text.
Here is an example:
https://www.homestratosphere.com/March 1, 2023 at 2:59 am #2551079David
StaffCustomer SupportHi there,
can I see your site that you want to apply this too ?
March 1, 2023 at 6:34 am #2551314Ivaylo
Sure, it is in the private section.
March 1, 2023 at 7:44 am #2551401David
StaffCustomer SupportOk,
1. Customizer > Layout > Primary Navigation, in the Mobile Menu label field: remove the text, so its left empty.
2. Customizer > Layout > Header enable the Mobile Header, and add a mobile header logo.Once thats done, let me know and ill provide the CSS to re-arrange the header items
March 1, 2023 at 11:51 am #2551855Ivaylo
All is done.
March 1, 2023 at 9:02 pm #2552148Leo
StaffCustomer SupportGive this CSS a shot:
@media (max-width: 768px) { #mobile-header .site-logo.mobile-header-logo { position: absolute; left: 50%; transform: translateX(-50%); margin-left: 0; } #mobile-header button.menu-toggle, #mobile-header .menu-bar-item > a { line-height: 70px; } #mobile-header .site-logo.mobile-header-logo img { height: 70px; } #mobile-header .menu-bar-item > a { padding-left: 20px ; } }Adding CSS: https://docs.generatepress.com/article/adding-css/
March 1, 2023 at 11:21 pm #2552209Ivaylo
Hi Fernando, thanks. Looks like it is working, but the logo is smaller than before and it should be menu on the left and search on the right.
Now it is menu on the right and search on the left.
March 1, 2023 at 11:29 pm #2552212Ivaylo
I’ve changed to this:
/* Logo between menu and search on mobile*/ @media (max-width: 768px) { #mobile-header .site-logo.mobile-header-logo { position: absolute; left: 50%; transform: translateX(-50%); margin-left: 0; } #mobile-header button.menu-toggle, #mobile-header .menu-bar-item > a { line-height: 88px; } #mobile-header .site-logo.mobile-header-logo img { height: 88px; } #mobile-header .menu-bar-item > a { padding-left: 20px ; } }so that the size of the logo is now better. Is this CSS correct?
I also have this one in my custom CSS:
/* FIXed CLS issues on mobile*/ @media only screen and (max-width: 600px) { .site-header { position: relative; min-height: 88px; } }Do I still need this CSS code or should I remove it now?
P.S. My logo image is 200×87 px
March 2, 2023 at 5:25 am #2552602Ivaylo
Any update? Thanks!
March 2, 2023 at 7:28 am #2552743David
StaffCustomer SupportRemove that CSS and use this instead:
@media(max-width:768px) { #mobile-header { padding: 0 10px; } #mobile-header button.menu-toggle { order: -1; margin-right: auto; } #mobile-header .site-logo.mobile-header-logo img { height: 88px } }March 2, 2023 at 7:35 am #2552752Ivaylo
Do you mean to remove both CSS codes:
/* Logo between menu and search on mobile*/ @media (max-width: 768px) { #mobile-header .site-logo.mobile-header-logo { position: absolute; left: 50%; transform: translateX(-50%); margin-left: 0; } #mobile-header button.menu-toggle, #mobile-header .menu-bar-item > a { line-height: 88px; } #mobile-header .site-logo.mobile-header-logo img { height: 88px; } #mobile-header .menu-bar-item > a { padding-left: 20px ; } }and
/* FIXed CLS issues on mobile*/ @media only screen and (max-width: 600px) { .site-header { position: relative; min-height: 88px; } }and replace them with the one you just sent?
March 2, 2023 at 7:37 am #2552754David
StaffCustomer Supportyes, you can remove both of those CSS codes.
March 2, 2023 at 7:42 am #2552758Ivaylo
Thanks, I replaced both codes with yours and it’s working fine. Menu is on the left, search on the right.
One more thing though – when I click on search icon it makes some space white and have a blinking cursor. Can we have this blank space hide the logo and menu icon and have a border around it.
I’m looking for the same output as the one on http://www.homestratosphere.com ( mobile ). Please take a look and see what I mean as it is hard to explain it all here with words.
March 2, 2023 at 8:22 am #2552959David
StaffCustomer SupportTry this CSS:
.navigation-search { border: 1px solid #f00; border-radius: 6px; overflow: hidden; max-width: calc(100% - 40px); top: 20px; }NOTE: GP 3.3 Theme has just gone into alpha and it has a new Search Modal:
March 2, 2023 at 8:28 am #2552972Ivaylo
this CSS works fine! Thanks! Where can I see a live version of the new GP 3.3 Search Modal?
-
AuthorPosts
- You must be logged in to reply to this topic.