How to make variants show in the same row Dawn Theme

Hi, I am wondering can someone help me with CSS to make my product page variants picked show in the same row?

Something like in the photo I attached, both on mobile and PC.

My website is domisana.com

1 Like

Hi @Domisana

  1. Go to Online Store → Theme → Edit code.
  2. Open your theme.css / based.css file and paste the code in the bottom of the file.
variant-selects {
    display: flex !important;
    gap: 10px !important;
}
.product-form__input.product-form__input--dropdown {
    flex: 50% !important;
}

If my reply is helpful, kindly click like and mark it as an accepted solution.
If you are happy with my help, you can help me buy a COFFEE
Thanks!

Hello @Domisana ,

Follow these steps:

  1. Go to Online Store → Theme → Edit code

  2. Open your base.css file and paste the following code at the bottom:

variant-selects { 
    display: flex !important;
    gap: 4px !important;
}
.product-form__input--dropdown {
    flex: 48% !important; 
}

Regards
Guleria

Hi @Domisana

Try this one.

  1. From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  2. Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  3. In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
@media only screen and (min-width: 749px) {
    .product__info-container variant-selects {
        display: flex;
        gap: 4%;
        width: fit-content;
        flex-wrap: nowrap;
    }

    .product-form__input {
        flex: 0 0 48% !important; 
        max-width: 48% !important; 
        box-sizing: border-box;
    }
}

Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!

Thank you for the answer! I just noticed that I also have quantity which I would like to fit into the row as well. Could you please modify the code so all 3 fit into one row?

Btw, on mobile, you see that variant is not entirely visible, it is cut