Shopify themes, liquid, logos, and UX
Hi!
As the title suggests, I have aligned my "Add to Cart" button with the "Quantity Selector" by adding the following piece of code to theme.liquid:
{% if template contains 'product' -%}
<style>
@media screen and (min-width: 767px) {
.product-form__input.product-form__quantity {
float: left !important;
margin-right: 2rem !important;
}
.product__info-container .product-form {
margin: 5.5rem 0 !important;
}
product-form.product-form {
display: flow-root !important;
}
}
This caused quite some white space to emerge below the elements (see image). Any suggestions on how I can reduce this white space?
As a bonus question I'd also like to remove the header associated with the quantity selector ("Aantal"). Any suggestions on how to do this as well?
Best regards,
Roekudoo
Solved! Go to the solution
This is an accepted solution.
Hi @roekudoo
You can try this code by following these steps:
Go to Online store => themes => actions => edit code and add this code on file theme.liquid before tag </body>
<style>
@media screen and (min-width: 980px){
button.product-form__submit.button.button--full-width.button--primary {
margin-bottom: -30px !important;
}
}
</style>
Hope this answer helps.
Best regards,
Victor | PageFly
Hi @roekudoo
Thank you for your question.
Please share your store URL, page URL and also password (if your store has one) so we can help you.
Thanks for the quick reply! The details are as follows:
Hi @roekudoo
You can try follow this path:
Themes => edit code => asset => base.css
and add this code to bottom of the file base.css
@media screen and (min-width: 767px){
.product__info-container .product-form {
margin-bottom: 0!Important;
}
}
Unfortunately this did not work. The answer given by PageFly-Victor did though. Thanks for your help nevertheless :).
This is an accepted solution.
Hi @roekudoo
You can try this code by following these steps:
Go to Online store => themes => actions => edit code and add this code on file theme.liquid before tag </body>
<style>
@media screen and (min-width: 980px){
button.product-form__submit.button.button--full-width.button--primary {
margin-bottom: -30px !important;
}
}
</style>
Hope this answer helps.
Best regards,
Victor | PageFly
This worked! Awesome, thank you
Could you please tell me how you managed to get the quantity selector? I am also using Dawn and selected 'Enable quick add', so I only have the 'Add to cart' button.
Starting 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, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024