What's your biggest current challenge? Have your say in Community Polls along the right column.

Align add to cart buttons

Solved

Align add to cart buttons

aromaticaparfum
Excursionist
43 0 6

This is my website: aromaticaparfums.com 

The file is product-list.liquid

 

currently it’s like the one on the left, I want it aligned like the right 

5bd12ac9-60f1-4e23-be31-01fba25c78ee.jpeg

please help 

Accepted Solution (1)
DaisyVo
Shopify Partner
1024 129 143

This is an accepted solution.

Hi @aromaticaparfum 

 

Please add this code more in the same position 
 

 

.collection__grid-loop.product__list-carousel .flickity-slider .product-index .product-metafields > p:nth-child(2) {
    height: 72px;
}

 

 
Here is the result: https://prnt.sc/gep-YTN0dHEP
 
Best,
 
Daisy
Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

View solution in original post

Replies 7 (7)

DaisyVo
Shopify Partner
1024 129 143

Hi @aromaticaparfum 

 

To complete your requests, please follow these steps:
  1. Go to Shopify Admin > Online Store > Theme > Customize > Theme Settings > Custom CSS https://prnt.sc/i8ljAMlHJUKl
  2. Paste the code provided into the Custom CSS section.

 

button.btn.add-to-cart-btn {
    margin-left: calc(100% - 120px) !important;
}

 

Here is the result: https://prnt.sc/XjL8G-qYxPdL
 
I hope this helps
 
Best,
 
Daisy
Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
aromaticaparfum
Excursionist
43 0 6

No. This is not what I wanted. I wanted all the add to cart buttons to be in a single line like this: - - - -

 

your code makes it: - _ - _ 

DaisyVo
Shopify Partner
1024 129 143

Hi @aromaticaparfum 

 

Please try this code 

 

.collection__grid-loop.product__list-carousel .flickity-slider .product-index .product-info {
    height: 100px !important;
}
.collection__grid-loop.product__list-carousel .flickity-slider .product-index .product-metafields {
    height: 140px !important;
}

 

Here is the result: https://prnt.sc/8qaRTClZF4No

 

I hope this helps

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
aromaticaparfum
Excursionist
43 0 6

Great job but can you make it such that retail price is also aligned just like the cart? IMG_0139.png

DaisyVo
Shopify Partner
1024 129 143

This is an accepted solution.

Hi @aromaticaparfum 

 

Please add this code more in the same position 
 

 

.collection__grid-loop.product__list-carousel .flickity-slider .product-index .product-metafields > p:nth-child(2) {
    height: 72px;
}

 

 
Here is the result: https://prnt.sc/gep-YTN0dHEP
 
Best,
 
Daisy
Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
aromaticaparfum
Excursionist
43 0 6

You are awesome but can you help decrease this big space in the middle between inspired by and retail price? 

IMG_0140.jpeg

tim
Shopify Partner
3911 394 1435

You can try code like this, either in "theme settings"=>"Custom CSS" or in "Custom CSS" of each section:

.product-index {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.product-index > :last-child {
  margin-top: auto;
  align-self: center;
}

 

Note:

You have problems with first item on collection pages -- must be HTML error -- browser removes the form tag (it exists in original HTML, but browser ignores it). If you click cart button there it does nothing.

 

I believe it's because of the <form id="main-collection-form"> line -- this should be removed.

HTML does not allow nesting forms, so when browser sees the <form> tag of the first product card it ignores it, but uses it's </form> tag to close the main-collection-form.

 

Screenshot 2024-11-16 at 2.21.05 PM.png

 

If my post is helpful, consider liking it -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com