Re: How to align to center the collection title on the main page, craft theme

Solved

How to align to center the collection title on the main page, craft theme

schmidt0812
Visitor
2 0 2

Hello

 

I want to align the title under a collection card in the centre, currently it is aligned left. how can i do that?

 

thank you 

 

 

Accepted Solution (1)

GemPages
Shopify Partner
5625 1262 1283

This is an accepted solution.

Hello @schmidt0812,

 

I would like to give you some recommendations to support.

Please go to Online Store > Themes > click 3 dots button > Edit code > Base.css  add code at the end of the file Base.css.

.collection-hero h1.collection-hero__title {
text-align: center !important;
}

 

I hope you find the answer helpful.

Kind & Best regards,
GemPages

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center

View solution in original post

Replies 9 (9)

kaalTechGeeks
Shopify Partner
318 58 81

Hi @schmidt0812
Just copy paste the below code at the bottom of the base.css file in the shopify theme code editor. 

/** CSS TO ALLIGN COLLECtION TITLE IN CENTER **/
h1.collection-hero__title {
    text-align: center;
}

After you have added the code then your collection title would be displayed as shown in the image below: 

kaalTechGeeks_0-1668957259750.png

Thanks

 

- If my answers saved you time and headaches, consider buying me a coffee!
- Check my profile: KaalTechGeeks | Reach out to me on my socials - Instagram | Skype | Mail
- Was my reply helpful? Click Like to let me know! & if your question was answered, Mark it as an Accepted Solution!

GemPages
Shopify Partner
5625 1262 1283

This is an accepted solution.

Hello @schmidt0812,

 

I would like to give you some recommendations to support.

Please go to Online Store > Themes > click 3 dots button > Edit code > Base.css  add code at the end of the file Base.css.

.collection-hero h1.collection-hero__title {
text-align: center !important;
}

 

I hope you find the answer helpful.

Kind & Best regards,
GemPages

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center
schmidt0812
Visitor
2 0 2

thank you it worked !

GemPages
Shopify Partner
5625 1262 1283

Hi @schmidt0812,

 

I am so glad that solution can help.

 

Kind & Best regards,
GemPages

GemPages - Build any high-converting store pages for any business


- If you find my reply helpful, please hit Like and Mark as Solution
- Get connected: App Store | Blog | Community | Help Center
BabyEden
Tourist
5 0 0

Thank you also - this worked for me. However how do I get the Collection description to centre underneath? It's odd that you can't actually centre the text on the page - all it does is justify it.

https://6n0v3g9rc92wkm6k-26310766.shopifypreview.com

If you navigate to 'Wear' > Baby 0-2yrs > Shop All - you'll see what I mean.

TomMc
Excursionist
31 3 7

I need to figure this out, too, BabyEden. 

 

Did you figure this out, by chance? 

Markhorleather
Visitor
1 0 0

It hasnt worked for me. Please help

adamsmith018
Tourist
10 0 3

did you ever fix this?

 

ahsan_dgins
Excursionist
28 1 2

@GemPages 

How to do it for the specific page that we have created ? For example, "Mens Shirts" Page or "About us" page.