Could anyone please help me?
I’d like to place the sale price and compare-at price on the same row and in a smaller font size on the collection page (mobile version only).
Ideally, they should be justified or aligned to the left margin.
I’d really appreciate any help or suggestions, thank you in advance!
Hi! Thank you so much for the quick reply!
The code helped align the prices to the left edge, but they’re still arranged in a column, and the size doesn’t seem to have changed either. Please see the screenshot below.
Here is a CSS snippet you can try (targeting mobile screens only) to place the sale price and “compare‑at” price in the same row, left‑aligned, and reduce their font size.
Go to your Shopify Admin.
Navigate to: Online Store → Themes
Open a file named something like:base.css or theme.css or theme.scss.liquid
To the bottom of that file, and paste the corrected CSS code
@media screen and (max-width: 749px) {
/* Make sure the container uses flex to align items in a row */
.price.price–on-sale {
display: flex !important;
flex-direction: row !important;
align-items: baseline;
gap: 4px;
}
Hi, thank you so much for your help, it worked for me!
Could we align the price and compare-at price on opposite sides so they’re justified?
And could you also let me know how to reduce the product title size there?