Centering Title of Product - DEBUT THEME

Highlighted
New Member
2 0 0

 @Ninthony  It worked like magic! Thank you so much!

 

 

0 Likes
Highlighted
Shopify Partner
1279 168 400

No problem. Keep me in mind if you're looking for a developer to do heavier modifications : D

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
Highlighted
Tourist
6 0 0

Ni Ninthomy

I am hoping you can assist me with the centering of the product title & price on the homepage, without it affecting the product pages. I have followed the instructions but nothing seems to work ?

here is my url: https://leafhealthproducts.com/

password: fleuza

 

thank you in advance

0 Likes
Highlighted
Shopify Partner
1279 168 400

You can add this to the bottom of your theme.scss.liquid in your assets folder and it should fix it for you:

 

div#shopify-section-featured-collections {
    text-align: center;
}

div#shopify-section-featured-collections dl .price__regular {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}
If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
1 Like
Highlighted
Tourist
6 0 0

WOW...so quick and it worked, thank you you so so much, if I need more work done can I contact you direct please?

0 Likes
Highlighted
Tourist
6 0 0

I just noticed that it does not apply to the collection pages, is there another set of css that I need to apply?

0 Likes
Highlighted
Shopify Partner
1279 168 400

Let me see if I can get an all in one solution for you, I assumed you just wanted it on the homepage.

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
Highlighted
Shopify Partner
1279 168 400

You can delete the other code you added and add this instead, should be good. It wont effect product pages but both your index and collection pages:

.template-collection .product-card__title, div#shopify-section-featured-collections, .template-collection .price__vendor  {
    display:block;
    text-align: center;
}

.template-collection dl .price__regular, div#shopify-section-featured-collections dl .price__regular {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

And yeah, feel free to contact me any time if you have some other work you need done. You can send me a personal message on here if you enable it in your profile.

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
1 Like
Highlighted
Tourist
6 0 0

Thank you for the fixes, they worked perfectly.

0 Likes
Highlighted
Tourist
6 0 0

Hi

I notice that on the homepage when I add a second featured products section that the text and price fall back left aligned and do not keep the css like the 1st section, is there a reason for that please?

0 Likes