Cart icon shifts search bar
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Cart icon shifts search bar’ is closed to new replies.
Home / Fixing WordPress / Cart icon shifts search bar
Hello!
I’ve had this problem for a while, but I just noticed what causes it.
When my cart is empty, the search bar is positioned in the middle – just like it’s supposed to be.
However, when I add items to cart, the block that displays the icons expands, shifting search bar to the left (it depends on the price of items for how much it expands).
I understand this is theme based, however the support threads in theme’s support don’t get any replies.
I would greatly appreciate any help that I get. I tried to replace “margin-left” with “transform: translateX”, but it doesn’t solve my problem.
Thank you
The page I need help with: [log in to see the link]
Do you even need to show the amount the total price there? If you do the below, it will hide it an not shift.
.woocommerce-Price-amount.amount bdi {
display: none;
}
Hi!
Thank you for your reply.
Yes, I want it to show total cart price.
I managed to fix the problem, so it’s fine. I changed the search box’s position to absolute and now it stays where it’s supposed to.
The code I used:
@media screen and (min-width : 1001px) {
.thaps-search-box {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}