Details Column Text Align Center for mobile view

Solved
uchiha123
Excursionist
21 0 6

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/Screenshot 2023-08-11 010046.png

Accepted Solutions (2)
Made4uo-Ribe
Shopify Partner
4175 957 1166

This is an accepted solution.

Hi @uchiha123 

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

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:

Ribe_Dagandara_0-1691790682618.png

I hope it help.

 

 

 

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

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


View solution in original post

PageFly-Henry
Globetrotter
504 130 104

This is an accepted solution.

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

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

Replies 2 (2)
Made4uo-Ribe
Shopify Partner
4175 957 1166

This is an accepted solution.

Hi @uchiha123 

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

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:

Ribe_Dagandara_0-1691790682618.png

I hope it help.

 

 

 

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

Please don't forget to 

Like

 and 

Mark Solution 

to the post that helped you. Thanks!
Sip, savor, and support – your

Coffee Tip

 helps us keep coding magic.❤️❤️❤️
Need a knowledgeable developer? Come and visit us at

Made4uo.com


PageFly-Henry
Globetrotter
504 130 104

This is an accepted solution.

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

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.