center product title and price, but dont center product descrption

New Member
12 0 0

I have figured out how to centre the product title and price in Debut them, for product collections and featured collections. however, the code i have pasted in is affecting my product description page. In the first attached image is the code i pasted to the bottle of my theme.scss.liquid template. the seconf image shows that this code has worked by center aligning the product titles on my main page in the feature collection section. third images shows how this code is affecting the product description (but only some of it???).

Does anyone know what might be wrong with my code and how i can edit it to avoid this weird misalignment on my product description page?Screen Shot 2020-01-19 at 18.39.55.pngScreen Shot 2020-01-19 at 18.39.45.pngScreen Shot 2020-01-19 at 18.39.32.png

0 Likes
Highlighted
Shopify Partner
482 89 103

Use parent class of body 
e,g for homepage use

.template-index .product-card-grid, .grid{
text-align: center !importane;
}
.template-index .price{
display: flex !important;
    justify-content: center !important;
}

In the same way you can do in other pages without affecting product description

Want to modify or custom changes on store hire me.
My Email: guleriathakur43@gmail.com
Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate small Click here (Its my paypal)
0 Likes
Highlighted
New Member
12 0 0

Hi Guleria

 

thanks for the response, however it still does not work. I pasted the code you suggested at the bottom of my theme.scss.liquid. should it be somewhere else?

 

0 Likes
Highlighted
Shopify Partner
482 89 103

follow this post https://community.shopify.com/c/Shopify-Discussion/Center-alignment-product-price-on-Home-page-only-...
In this post i answered just for price but you can manage title in same way without affecting product page description.

Want to modify or custom changes on store hire me.
My Email: guleriathakur43@gmail.com
Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate small Click here (Its my paypal)
0 Likes
Highlighted
New Member
12 0 0

hello again,

 

thank you for the link, but I am afraid this does not work either. My shop is curajewellery.com.


0 Likes
Highlighted
Shopify Partner
482 89 103

Add this css in the bottom of theme.scss.liquid 

its only for homepage

.template-index .product-card__title {
    text-align: center;
    display: flex;
    justify-content: center;
}
.template-index dl.price {
    display: inline-block;
    text-align: center;
}

  

Want to modify or custom changes on store hire me.
My Email: guleriathakur43@gmail.com
Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate small Click here (Its my paypal)
0 Likes
Highlighted
New Member
12 0 0

thank you. still didnt work but managed to fix it on product-card-grid.liquid.

 

thank you for your quick assistance though!

0 Likes