We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Align Quantity Selector on Product Page

Solved

Align Quantity Selector on Product Page

LycetteGreg
Tourist
11 0 3

The alignment of my quantity selector is off - here are a couple of examples:

https://www.lycettedesigns.com/collections/project-bags/products/palm-beach-ndlpt-boat-tote-natural

https://www.lycettedesigns.com/products/lycette-logo-vinyl-project-bag

 

It seems to happen any time I have a variant selector on the page. Is there custom css I can apply to this theme template for these products to make it look more normal? 

Accepted Solution (1)

tim
Shopify Partner
4812 598 1733

This is an accepted solution.

Try this in section's "Custom CSS":

.product-options {
  display: flex;
  flex-wrap: wrap;
}
If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

View solution in original post

Replies 4 (4)
LycetteGreg
Tourist
11 0 3

You can see the quantity selector way out to to the right. It looks like it is aligning with the end of the variants, not up against where it says "Quantity"LycetteGreg_0-1750301969933.png

It should look more like this: 

LycetteGreg_1-1750302107407.png

 

The theme is called Grid

tim
Shopify Partner
4812 598 1733

This is an accepted solution.

Try this in section's "Custom CSS":

.product-options {
  display: flex;
  flex-wrap: wrap;
}
If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

Mustafa_Ali
Trailblazer
523 51 101
<style>
@media screen and (min-width: 768px) {
.product-options {
    display: contents !important;
}
}
</style>

Mustafa_Ali_0-1750314255317.png

hey @LycetteGreg dear follow these steps
Go to online store ----> themes ----> go to three Dots ----> edit code ---->find theme.liquid files ----> place the code ---->before the </body> ----->
before the body ----->
if this code work please do not forget to like and mark it solution

 

"Need a Shopify Specialist"?Chat on WhatsApp
Or email at: mustafaalideveloper001@gmail.com
"If my solution was helpful, mark it as a solution and hit the like button! And wait don't forget to"

mt686
Shopify Partner
146 12 21

Hey there!

I can see the quantity selector alignment issue on your product pages. This is a common problem when variant selectors affect the layout. Here's how to fix it:

Solution: CSS to align quantity selector

  1. Go to Shopify Admin → Online Store → Themes → Actions → Edit Code
  2. Find assets/base.css or assets/section-product-form.css
  3. Add this CSS:
/* Fix quantity selector alignment */
.product-form__buttons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.product-form__quantity {
  display: flex;
  align-items: center;
}

.quantity {
  display: flex;
  align-items: center;
  margin: 0;
}

/* Ensure variant picker doesn't break layout */
.product-form__input {
  margin-bottom: 15px;
}

.product-form__input:last-child {
  margin-bottom: 0;
}

If that doesn't work, try this more specific approach:

.product-form .product-form__buttons .quantity {
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
}

.product-form__cart-submit {
  vertical-align: middle;
}

This should align your quantity selector properly with the add to cart button, regardless of variant selectors above.

Alternative: I actually built Easy Edits that lets you click and drag elements into perfect alignment without hunting for CSS selectors. Great for fixing layout issues like this!

Try the CSS and let me know if it fixes the alignment!