Details Column Text Align Center for mobile view

I want details column text align center for mobile view only. For the desktop I want to keep it left align as shown in the image. The theme I have doesn’t have option to differ for mobile and website view. How can I make it centered view for mobile? store: https://techshieldny.com/

1 Like

Hi @uchiha123

Im not sure which details youll like to center. I just center all. :sweat_smile:

Try this one.

  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:
  4. And Save.
@media only screen and (max-width: 766px) {
.wrap-product-info {
    text-align: center;
}
.pr_price_single.pr_price_single-template--19102647484715__main.mb20.fl.f-aic.f-wrap {
    justify-content: center;
}
.fl.f-aic.mb15 {
    justify-content: center;
}
}

Result:

I hope it help.

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

1 Like

Hi @uchiha123

This is Henry from PageFly - Landing Page Builder App

You can try this code by following these steps:

Step 1: Go to Online Store->Theme->Edit code.

Step 2: Search file theme.css

Step 3: Paste the below code at bottom of the file → Save

@media only screen and (max-width: 766px) {

.pr_form_item {

text-align: center !important;

}

}

Hope that my solution works for you.

Best regards,

Henry | PageFly

1 Like