Center Collection Title and Description in Studio Theme

Every other page on my site has the titles and rich text centered however in the “shop” which is just a page with all my collection in it the title and description are left justified. I’ve tried a few suggestions to the base.css but so far nothing has been able to center it. Any help would be greatly appreciated.

Thank you!

Hi @onelastwave ,

Thank you for reaching out to the Shopify Community!

Please share your store URL here so that we can check and provide a solution to you.

Thanks & Regards,
Ahsan ANC

Thanks for taking a look. Here is the link!

https://onelastwaveproject.myshopify.com/collections/c

You can try this code

  1. Go to Online Store-> Theme->Edit code
  2. Asset-> base.css ->paste the below code at the bottom of the file.
.collection-hero__title+.collection-hero__description,.collection-hero__title {
    text-align-last: center !important;
        margin-left: auto !important;
    margin-right: auto !important;
}
2 Likes

Brilliant, thank you so much for that! Greatly appreciated.

Just a last quick question if you have a moment. If I wanted to mirror how the other page titles and descriptions are would it be in the same way. Looks like they are left justified but have a left margin that pushes them closer to center. The purely centered title and description on my Shop page now look different. That was my mistake in how I asked the question.

I ended up changing it to the following which seemed to work just not sure it is the best way to do it.

.collection-hero__title+.collection-hero__description,.collection-hero__title {
text-align-last: left !important;
margin-left: 18% !important;
margin-right: 18% !important;
}

1 Like

There are other ways to do that. this also looks good.