Liquid, JavaScript, themes, sales channels
If my cart is empty and I enter the cart, there's a lot of unequal blank space around the text and the button, depending on the device I use. Look at the images below. I want to center the "Your cart is empty" part and the "Continue shopping" button so that they will be centered on every device and there would be equal blank space on all sides. Any help is appreciated.
Hey @XC24.
Thanks for reaching out.
I appreciate that you have provided us with the theme that you are using for the store as that is very helpful! Looking into the Dawn theme, I noticed that centering the Cart is empty message on the cart page is not available using the Theme Editor. However, you could possibly make a change of coding to the theme to have it displayed as you would like. Since the Dawn theme is designed and supported by Shopify, we can use free design time for Shopify themes to allow our internal team to make the changes on your behalf.
If you are interested in using the design time, you will need to navigate to the Help Center to speak directly with our live support.
Let me know if you have any questions.
Ollie | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
HI @XC24 ,
You can add the following code to the main-cart.liquid file (for me using the dawn theme, add it to main-cart-items.liquid)
{% if cart.item_count == 0 and request.path == '/cart'%}
<style>
#MainContent {
display: flex;
justify-content:center;
align-items: center;
}
#WebPixelsManagerSandboxContainer{
display: none;
}
</style>
{% endif %}
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
For B2B solutions and custom pricing, check out B2B Solution & Custom Pricing |
For adding product labels/badges, visit Product Labels by BSS
BSS Commerce - Shopify Apps & Store Development Service Provider
Hire a Shopify expert | Shopify Plus Store Development
Thanks for the reply. But it dosen't seem to work unfortunately.
User | RANK |
---|---|
38 | |
29 | |
13 | |
11 | |
8 |
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023