Archived topic
GeneratePress Header (for Mobile)
7 replies · Started by Sumit on June 11, 2021
I'm using default GneratePress header on my site BloggingLift.com
It's looking good on the desktop. But on the mobile devices, Menu and Search Icon are showing below the website logo.
How to align logo, menu and search icon in the same line in the mobile device?
Please share the CSS code for this which I can add in the additional CSS section.
Waiting for your reply. Please help me.
Hi there,
Can you first edit this CSS you've added:
.main-navigation .site-logo.navigation-logo img {
height: 50px;
margin-top: 15px;
margin-left: 10px;
}
To this so it's desktop only?
@media (min-width: 769px) {
.main-navigation .site-logo.navigation-logo img {
height: 50px;
margin-top: 15px;
margin-left: 10px;
}
}
after adding this code, It alined everything in the same line.
But LOGO is not showing on Mobile Device. Please check and reply immeditaly.
Hi there,
did you resolve this as i can see the Logo on mobile
Actually, I replaced it with old CSS because It was not showing logo in the mobile devices.
Can you add my CSS in so I can see the issue?
https://generatepress.com/forums/topic/generatepress-menu-for-mobile/#post-1819336
Please clear and disable your caching plugin when we are trying to help.
Thanks!
Hello Leo, I again added that custom CSS.
The logo is showing But Menu & Search bar is still showing below the logo.
I want the Logo, Menu & Search bar in the same line.
Please Open Blogging Lift on a mobile device and check it.
Thanks in advance
There isn't a great solution here as the main issue is that the logo image is simply too wide for a mobile screen.
I would say add this CSS:
@media (max-width: 768px) {
.main-navigation .navigation-logo img {
width: 200px;
height: auto !important;
}
}
Then remove the mobile menu label to save some space:
https://docs.generatepress.com/article/mobile-menu-label/