How to center text in collection list section

Hello,

I was wondering if there was a way for me to center the text in the collection list section. I tried with some code someone else gave me and it worked but it also centered everything else like the price which I don’t want. I just want it to be centered in the specific section.

URL:https://www.yivan.us/

Pass: YIVAN24

1 Like

Hi @YIVAN

  • Go to Online Store → Theme → Edit code.
  • Find the file assets/base.css and paste the code below at the bottom of the file.
.collection-list .card__heading {
text-align: center;
}

4 Likes

Thank you worked great, but is there a way to also achieve this on mobile?

2 Likes

Hi @YIVAN

  • Go to Online Store → Theme → Edit code.
  • Find the file assets/base.css and paste the code below at the bottom of the file.
.card__heading {
text-align: center!important;
}

2 Likes

Im not sure why but the code didn’t work for me. There might be another code that is overwriting it?

1 Like

Hi @YIVAN

  • Go to Online Store → Theme → Edit code.
  • Find the file assets/base.css and paste the code at the TOP of the file.
.card__heading {
text-align: center!important;
}

1 Like

Ok, that worked. But do you know how to do it so it doesn’t affect the product title?

1 Like

Hi @YIVAN

  • Go to Online Store → Theme → Edit code.
  • Find the file assets/base.css and paste the code below at the bottom of the file.
.card__heading.h5 {
text-align: inherit!important;
}

1 Like

Perfect, thank you.

1 Like

Hi @YIVAN

Great to hear that the issue has been resolved! If my assistance was helpful, please consider liking and accepting the solution. Feel free to reach out if you have any further questions.