Archived topic
Hamburger menu on the left in mobile version
11 replies · Started by ioan on November 18, 2021
Hello, I am developing a woocommerce website with GP Premium.
We have two menus, the primary one only contains the user icon and the secondary one the accesses to other pages.
Is it possible that in the mobile version it will show the hamburger with the Secondary menu collapsed on the left side, on the right side the Primary menu not collapsed (user icon) plus the shopping cart icon, and the logo in the center.
Thanks in advanced.
Hi there,
Any chance you can link us to the site in question?
You can use the private information field.
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
Sorry, its offline under development environment
Just looking for a way to put on mobile the hamburger with the Secondary menu on the left, the logo centered and the primary menu and shopping cart icon on the right
Sorry but I have to see the site to know what CSS code is needed.
Can you get back to us when it's online?
Let me know :)
Ok. I think it could work with the link:
It's another website that is on line and has similar conditions, so solutions for this one will work.
Inadvertently I mark the topic as resolved and it is not. Could you please help me.
Are you trying to achieve something like this?
https://www.screencast.com/t/NXM5UUybsg
If so, try this CSS:
@media (max-width: 768px) {
nav#site-navigation {
position: absolute;
top: 78.2px;
right: 0;
height: 35px;
}
}
Thank for your support Ying, what I try the archive is, on the same horizontal line: on the left side the hamburger with the Secondary menu, in the middle (centered) the logo, and on the right side the Primary menu (not collapsed because it only has the font awesome user icon) and the cart icon.
That's quite a lot customizations especially you've already have some CSS regrading the header section.
I can't guarantee the same CSS would work for your other site:
Give this CSS a try:
@media (max-width: 480px) {
.site-logo {
position: absolute;
left: 50%;
transform: translatex(-50%);
top: 0;
}
button.menu-toggle.secondary-menu-toggle {
width: 20px;
display: flex;
background-color: transparent!important;
color: #009999 !important;
margin-top: -40px;
padding-bottom: 20px;
padding-top: 20px;
}
.secondary-navigation .inside-navigation {
flex-wrap: wrap;
justify-content: flex-start;
}
.secondary-navigation.toggled .main-nav {
width: 100%;
}
body .secondary-navigation {
background-color: transparent !important;
}
.secondary-navigation {
padding-left: 0 !important;
}
nav#site-navigation a {
font-size: 20px !important;
}
.main-navigation .inside-navigation {
padding-top: 20px;
margin-bottom: -20px;
}
}
Great! As you mention before, it was hard to give me the right css code, but you put me on the way. Thanks you very muchs.
As always, excellent support from GeneratePress team.
I will mark it as resolved.
You are welcome :)
Hope it will work for your other site somehow!