Align text and title

Topic summary

A Shopify store owner needs help aligning product titles and prices on their collection page’s mobile view to match their landing page layout (title left, price right).

Solutions Provided:

Multiple developers offered CSS-based fixes with similar approaches:

  • BSS-TekLabs: Suggested adding custom CSS via theme.liquid file before the </head> tag, targeting product card info elements
  • Made4uo-Ribe: Provided CSS code for both mobile and tablet screens to be added to base.css, style.css, or theme.css
  • mt686: Offered a simpler CSS solution and mentioned EasyEdits app as a no-code alternative

Refinements Requested:

The store owner asked for adjustments:

  • Add spacing from edges (not completely left/right aligned)
  • Reduce vertical space between product images and text

Both BSS-TekLabs and Made4uo-Ribe provided updated code snippets with modified justify-content and gap properties to address these requests.

Status: The discussion remains open with multiple working solutions provided, awaiting the store owner to test and mark a final solution.

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

Hi! I want on the collection page ‘t=shirts’ the title and price to be the same as on the landing page on phone view. So title left and price right. Because it is a bit messed up now…:

https://discinetherlands.com/collections/t-shirts

please let me know if you can fix this!

2 Likes
  • Here is the solution for you @Disci
  • Please follow these steps:
  1. Go to Online Store → Theme → Edit code.
  2. Open your theme.liquid file
  3. In theme.liquid, paste the below code before and press ‘Save’ to save it

  • This is the result you will get:

  • Please press ‘Like’ and mark it as ‘Solution’ if you find it helpful. Thank you.

Hi @Disci

Try this one, it not only for mobile screen but also the tablet screen.

  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 (min-width: 769px) {
    .product-card__info .v-stack.justify-items-center.gap-1 {
        justify-content: space-between !important;
        gap: 1rem !important;
        width: 100%;
    }
}

.v-stack.justify-items-center.gap-2 {
    width: 100%;
}

@media (max-width: 768px) {
    .product-card__info .v-stack.justify-items-center.gap-1 {
        justify-content: space-between !important;
        gap: 1rem !important;
        width: 100%;
    }
}

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

Yes nice! but can you make sure the title and price go a bit more to the inside. So not completely on the left and right, but leave some space.

1 Like

Do you want like this?


you can try this code @Disci

Yeps, sure. Use this code inastead. Same Instruction.

@media (min-width: 769px) {
    .product-card__info .v-stack.justify-items-center.gap-1 {
        justify-content: space-around !important;
        gap: 1rem !important;
        width: 100%;
    }
}

.v-stack.justify-items-center.gap-2 {
    width: 100%;
}

@media (max-width: 768px) {
    .product-card__info .v-stack.justify-items-center.gap-1 {
        justify-content: space-around !important;
        gap: 1rem !important;
        width: 100%;
    }
}

And Save.

Result:

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

If you want like this. you can using this code @Disci


yes but less vertical space between the picture and text


To less vertical I already add some code. Same Instruction.

@media (min-width: 769px) {
    .product-card__info .v-stack.justify-items-center.gap-1 {
        justify-content: space-around !important;
        gap: 1rem !important;
        width: 100%;
    }
}

.v-stack.justify-items-center.gap-2 {
    width: 100%;
}

@media (max-width: 768px) {
    .product-card__info .v-stack.justify-items-center.gap-1 {
        justify-content: space-around !important;
        gap: 1rem !important;
        width: 100%;
    }
}

.product-card {
    gap: .50rem !important;
}

And Save.

Result:

Let me know if you need more changes. Thanks!

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


@Disci

Can you try this code @Disci


You can align the title and price on your collection page in mobile view using CSS. Here’s how to fix it:


Steps to Align Text and Price1. Log in to Shopify Admin:

  • Navigate to Online Store > Themes > Edit Code.
  1. Locate the CSS File:

    • Open the theme.css or style.css file in the Assets folder.
  2. Add Custom CSS: Add this code at the bottom of the file:

.v-stack.justify-items-center.gap-2{
  width: 100%;
}
.v-stack.justify-items-center.gap-1{
  width: 100%;
}
  • Save and Test:

    • Save your changes and refresh the mobile version of the collection page to confirm the title and price are aligned correctly.

Easier Solution with EasyEdits

If you’d prefer a no-code solution, EasyEdits can help you visually align elements with a simple drag-and-drop interface. You can try it during the free trial and keep your changes forever.


Let me know if you need further help or if you’d like me to guide you through testing the class names! :blush: