Center collection title on mobile - Shoplight theme

Solved
ryanrooster
Tourist
4 0 4

Morning!

 

Wondering if someone could show me where to change the code (or just normal settings) to center collection titles on mobile only. My website is roosterwilson.com if you want to take a look. The pw to enter is doodledoo.

 

Thanks!

Accepted Solution (1)
Natasha-Saed
Shopify Partner
303 32 55

This is an accepted solution.

1) Go to online store
2) Edit Code
3) Open your base.css file
4) Paste the following code:

@media only screen and (max-width: 768px) {
.title-wrapper--no-top-margin {text-align: center !important;}
}

5) Save.

Let me know if it work by marking it as a solution.

If my solution helped you don't forget to accept it to help others.
===================================================================
And if you really like my support share a cup of coffee with me paypal.me/freemindsint

View solution in original post

Replies 9 (9)
Natasha-Saed
Shopify Partner
303 32 55

This is an accepted solution.

1) Go to online store
2) Edit Code
3) Open your base.css file
4) Paste the following code:

@media only screen and (max-width: 768px) {
.title-wrapper--no-top-margin {text-align: center !important;}
}

5) Save.

Let me know if it work by marking it as a solution.

If my solution helped you don't forget to accept it to help others.
===================================================================
And if you really like my support share a cup of coffee with me paypal.me/freemindsint
ryanrooster
Tourist
4 0 4

Worked perfectly. Thank you!

ryanrooster
Tourist
4 0 4

Also wondering if you could help me center the name of the product (on mobile) after you click on the product.

Natasha-Saed
Shopify Partner
303 32 55

Yes sure,

 

Just add the following code at the end of your base.css file.

 

@media only screen and (max-width: 768px) {
.product__title {text-align: center !important;}
}

 

NatashaSaed_0-1695913098354.png

 

If my solution helped you don't forget to accept it to help others.
===================================================================
And if you really like my support share a cup of coffee with me paypal.me/freemindsint
ryanrooster
Tourist
4 0 4

Thank you!

Stan-Grumspot
Shopify Partner
21 0 2

Try this 
 

@media only screen and (max-width: 600px) {
  .collection__title {
text-align: center!important;

}
}
If you need help with anything Shopify - you can get in touch at business@grumspot.com
Beae_Anthony
Shopify Partner
436 167 168

Hi @ryanrooster ,

This is Anthony from Beae Landing Page Builder, and I’m happy to assist you today.

 

While I acknowledge that this issue falls short of the desired outcome, I have an idea that I believe might be of help:

1. Go to Online Store -> Theme -> Edit code
2. Open your theme.liquid file
3. Paste below code before </body>:

<style>
@media only screen and (max-width: 767px){
h2.title.inline-richtext.h2.scroll-trigger.animate--slide-in {
    text-align: center;

}
}
</style>

Beae_Anthony_0-1695909195893.png

 

Best regards,

Anthony

 

Beae - The NextGen Page Builder


- Was my answer helpful? Please hit Like or Mark it as solution!
- Get in touch with us: App Store | Blog
Moeed
Shopify Partner
3051 761 925

Hey @ryanrooster 

 

Follow these Steps:

1) Go to Online Store
2) Edit Code
3) Find theme.liquid file

4) Add the following code in the bottom of the file above </body> tag

<style>
.collection-hero__title {
    text-align-last: center;
}
</style>

RESULT:

Moeed_0-1695909226222.png

 

If I managed to help you then, don't forget to Like it and Mark it as Solution!

 

Best Regards,
Moeed

Need a Shopify developer? Chat on WhatsApp


- For Shopify Design Changes | Shopify Custom Coding | Custom Modifications
- Your Coffee Tip and my code, A perfect blend. ❤️
Made4uo-Ribe
Shopify Partner
4255 983 1200

Hi @ryanrooster 

Try this one. 

  • From your Shopify admin dashboard, click on "Online Store" and then "Themes".
  • Find the theme that you want to edit and click on "Actions" and then "Edit code".
  • 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 only screen and (max-width: 749px){
h2.title.inline-richtext.h2.scroll-trigger.animate--slide-in {
    text-align: center;
}
}

 

  • And Save. 
  • Result:
  • Made4uoRibe_0-1695911246166.png
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