Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
Thanks for the reply. But it dosen't seem to work unfortunately.
We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024