Re: Dawn - Reduce whitespace resulting from putting "Add to Cart" and "Quantity Selec

Solved

Dawn - Reduce whitespace resulting from putting "Add to Cart" and "Quantity Selector" on one line

roekudoo
Tourist
8 0 1

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?

 

roekudoo_0-1675150255072.png

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

 

Accepted Solution (1)

PageFly-Victor
Shopify Partner
7865 1785 3103

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>

 

PageFlyVictor_0-1675152210961.png

 

<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

View solution in original post

Replies 7 (7)

ExpertRookie
Shopify Partner
1518 249 321

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.

- Was my reply helpful? Please Like and Accept Solution to let me know!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me on expert.rookie.team@gmail.com regarding any help.
roekudoo
Tourist
8 0 1

Thanks for the quick reply! The details are as follows:

ExpertRookie
Shopify Partner
1518 249 321

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;
}
}
- Was my reply helpful? Please Like and Accept Solution to let me know!
- Want to modify or custom changes on store Hire me.
- Feel free to contact me on expert.rookie.team@gmail.com regarding any help.
roekudoo
Tourist
8 0 1

Unfortunately this did not work. The answer given by PageFly-Victor did though. Thanks for your help nevertheless :).

PageFly-Victor
Shopify Partner
7865 1785 3103

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>

 

PageFlyVictor_0-1675152210961.png

 

<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

roekudoo
Tourist
8 0 1

This worked! Awesome, thank you

Natural1
Tourist
7 0 1

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.