Archived topic
Add to cart button and menu are showing LTR instead of RTL
8 replies · Started by Nave on July 26, 2021
Hello guys,
I'm using generatepress with woocommerce.
When I'm adding the "cart" icon button to the menu it causes the menu to switch from the right side to the left side and the cart icon is showing over the menu (My website is RTL so menu should be on the right side).
if im adding the search option to the menu then the cart icon goes to the right and the menu goes to the left - but it should be the opposite.
How to I make the menu on the right and the cart icon on the left?
This is happening only on the mobile version. on desktop it seems alright.
mobile:
https://imgur.com/VoTu1RJ
Desktop:
https://imgur.com/surVpNp
Mobile (how it should be):
https://imgur.com/eKp3f6Z
Hi there,
can you share a link to where i can see the issue?
Hi Nave,
Try this CSS:
@media (max-width: 768px) {
.mobile-bar-items.wc-mobile-cart-items {
order: 10;
margin-right: auto;
}
.inside-navigation {
display: flex;
}
}
Thanks Ying,
I tried that but the menu is opening kind of strange.
Also if im removing the search option from the menu it all comes back to what is was.
with search option
https://imgur.com/8eYy0aK
without search option
https://imgur.com/psSLjLD
Also if im first removing the search in menu option and then pasting the code you sent me there is no difference and the menu and cart icon remain in the same position (left side - one on top of the other)
Try this CSS instead:
@media (max-width: 768px) {
.inside-navigation {
display: flex;
flex-wrap: wrap;
}
.mobile-bar-items.wc-mobile-cart-items {
order: 10;
margin-right: auto;
}
#primary-menu {
flex: 1 0 100%;
order: 20;
}
}
Thanks David, it worked but once I remove the search option in the menu it goes back to be on top of the other.
Do you not want the navigation search?
If so disable it and ill take another look.