All things Shopify and commerce
Hi everyone,
I wanted to align the product details on my product cards in my collection, but I can't find any settings for this. Does someone know how can I adjust it? See photo for reference:
Store Preview Link: https://kan7abddby8ipngr-13830324282.shopifypreview.com
Hi @IntechCarl
You can try to follow this step
Step 1: Go to Edit code
Step 2: Find file base.css and add this code at the end of the file
.card__information .card__heading {
height: 150px;
}
Result
Best,
Liz
Hi! @LizHoang Thanks for this, but I don't want to include the star rating with the Price and texts. Is there a way to do that?
@LizHoang I only wanted the prices and the text below it to be aligned not with the star
Hello @IntechCarl . Go to your theme settings and in Custom CSS section add the following code:
.card-information .price__container {
text-align: center;
}
@BrainStation23 Thank you for your response, but this code make it centered aligned, What I want it to be straight not zigzag like in the photo attched, without compromising any styles/attributes from mobile view.
Hi @IntechCarl
I tried, but there’s an issue with the rating count. It requires some edits in the Liquid code to align them together properly.
@media only screen and (min-width: 989px){
.card-information {
display: flex;
flex-direction: column;
justify-content: space-evenly;
}
.card__information .card__heading {
height: 30%;
}
.card__content .card-information {
height: 100%;
}
}
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
Hi! Is it possible to align just the prices? some of my products don't have product ratings. So I'm wondering if it is possible to make the prices as the base line of the alignment, like even if there's a star or not the prices are still aligned to each other?
This might require Liquid code conditions to align all the prices, whether they have reviews or not.
Since I can't access Shopify preview links directly, I can guide you based on common Shopify themes and product card adjustments.
To align the product details (title, price, buttons, etc.) on your product cards in your collection, you have a few options:
If your theme doesn’t offer an alignment option, you can fix it with CSS:
css
CopyEdit
.product-card {
display: flex;
flex-direction: column;
justify-content: space-between;
min-height: 100%;
}
.product-card__title,
.product-card__price,
.product-card__buttons {
text-align: center; /* Adjust if needed */
}
If the issue is with uneven heights causing misalignment:
css
CopyEdit
.product-card {
min-height: 400px; /* Adjust the height */
}
If the issue is caused by dynamic content, you might need to edit the collection.liquid or product-card.liquid file. Look for:
liquid
CopyEdit
<div class="product-card">
And ensure all elements are wrapped properly.
Let me know if you need help adjusting it!
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025