Centered but not staying centered when on different screen widths.

Topic summary

A user encountered alignment issues on their Shopify product page where elements (product name, star ratings, and quantity selector) appeared misaligned on wider screens despite using CSS to center content.

Problem Details:

  • Screenshots showed the quantity selector and review elements (name/stars) were not properly aligned
  • Existing CSS included centering code but didn’t account for all responsive scenarios

Solution Provided:

  • Initial CSS fix addressed the quantity selector alignment:

    • HTML .product-form__input { max-width: 100%; }
    • Flexbox adjustments for review ratings
  • After the user reported the review section remained misaligned, an updated CSS solution was provided:

    • Added justify-content: center and align-items: center to .jdgm-row-profile
    • Maintained the flexbox column direction for ratings

Resolution:
The issue was successfully resolved with the updated CSS code, properly centering all product page elements across different screen widths.

Summarized with AI on October 31. AI used: claude-sonnet-4-5-20250929.

Hi there,

I have used code to centre text etc. but on some different screens usually wider ones somethings are at different locations for example the quantity selector below and where the red square is the name and the stars are not aligned. i’ll add the code which i am using on the site under the images any help is appreciated. Thank you.

@media screen and (min-width: 990px) {
.title-wrapper-with-link {
align-items: center;
justify-content: center;
}
}
.price {
text-align: center;
}
.button,
.button-label,
.shopify-challenge__button,
.customer button {
color: #000 !important;
}
.quick-add__submit,
#ProductSubmitButton-template–23181705642311__1a50ed06-4aea-4880-aa90-9275eda9fe5a,
#ProductSubmitButton-template–23181705642311__9803d0e9-87e1-45f7-a189-adfa8f700b7b,
#ProductSubmitButton-template–23181705642311__6accbc60-59b0-4012-ba9b-d0ac5cd19eaa,
#ProductSubmitButton-template–23181705806151__main {
background: #fdd017;
}
.image-with-text:not(.image-with-text–overlap) .color-background-1,
.image-with-text.image-with-text–overlap
.image-with-text__media.color-background-1 {
border: none;
}
label.form__label.custom {
color: #fdd017 !important;
}
@media screen and (max-width: 990px) {
.list-menu__item {
display: flex;
align-items: center;
justify-content: center !important;
}
}
@media screen and (min-width: 750px) {
.footer-block__details-content > li:not(:last-child) {
margin-right: 0;
}
}
.custom .field__input {
border: 1px solid #fdd017;
}

1 Like

Hi @TFE1

Thank you for reaching out to the Shopify community. I’d be glad to assist you. Could you kindly share your store URL and password (if it’s password-protected) so I can review it and provide you with an update?

Hi @TFE1

Please add this more code to solve your issue

HTML .product-form__input { max-width: 100%; }
.product .jdgm-row-rating {
    display: flex;
    flex-direction: column;
}

Perfect thank you it has worked for the quantity selector but for the review which enquired about its still out of aligment, as you can see from the name “chloe”

1 Like

Send me that page link please

Code uddated

HTML .product-form__input { 
    max-width: 100%; 
}
.jdgm-row-profile {
    display: flex;
    justify-content: center;
    align-items: center;
}
.product .jdgm-row-rating {
    display: flex;
    flex-direction: column;
}
1 Like

youre the best thank you so much!