Move size options to the left inline

Topic summary

A user seeks to move size option buttons to align left with other product information on their collection page, specifically on mobile view. An image shows the current centered layout that needs adjustment.

Two solutions were provided:

  1. CSS injection approach: Add custom CSS to the theme.liquid file before the closing </body> tag to left-align the size swatches on mobile screens.

  2. Direct file editing approach:

    • Modify the collection template file (ets-fs-best-selling-products, line 4281) to change margin-left from 0px to 5px for mobile screens
    • Edit the usf.css file (line 636) to change justify-content from center to flex-start in the .usf-swatchs ul selector

Both solutions target mobile screens (max-width: 767px) and involve adjusting flexbox alignment properties. The discussion remains open with no confirmation from the original poster about which solution was implemented or whether the issue was resolved.

Summarized with AI on November 8. AI used: claude-sonnet-4-5-20250929.

Hi,

I need help to move the size options in line with the rest of product info. My site is https://luxurymrkt.com/collections/ets-fs-best-selling-products

Hello @Luxurymrkt ,

I understand you are looking to provide the left alignment on the mobile screen as mentioned in your screenshot.

Please add the below code at the bottom of the theme.liquid file before tag and save.


Output -:

I hope the code helps you.

Thank you.

Hello @Luxurymrkt

Go to online store ---------> themes --------------> actions ------> edit code-------> search—> Collections-----> ets-fs-best-selling-products ----> line number 4281
search this code

@media screen and (max-width: 767px) {
.usf-swatchs ul {
margin-left: opx !important;
}
}

and replace with this code

@media screen and (max-width: 767px) {
.usf-swatchs ul {
margin-left: 5px !important;
}
}

Go to online store ---------> themes --------------> actions ------> edit code-------> search—> assets -----> usf.css -----> line number 336
saerch this code

.usf-swatchs ul {
text-align: center;
padding: 3px;
list-style: none;
flex-wrap: wrap;
display: flex;
align-items: center;
width: fit-content;
margin: auto;
justify-content: center;
}

and replace with this code

.usf-swatchs ul {
text-align: center;
padding: 3px;
list-style: none;
flex-wrap: wrap;
display: flex;
align-items: center;
width: fit-content;
margin: auto;
justify-content: flex-start;
}

and the result will be

let me know if this was helpful.