HOW TO CENTER THE PAGE TITLE - MINIMAL THEME

pa3cia_m
New Member
8 0 0

Hi! I tried to search my question but the replies seems outdated since it was posted in 2014.. my question is how do you center align the page titles as it is always appearing as default alignment to the left..

 

my page.liquid code shows:

 

 

<div class="grid">

  <div class="grid__item post-large--two-thirds push--post-large--one-sixth">

    <div class="section-header">
      <h1 class="section-header--title">{{ page.title }}</h1>
    </div>

    <div class="rte">
      {{ page.content }}
    </div>

  </div>

</div>

 

 

how do i edit it to make the title on the center? thanks

0 Likes
KarlOffenberger
Shopify Partner
1867 182 803

Hello,

 

You can either add in-line styles since you already found the correct liquid file to edit by doing

 

<div class="section-header" style="text-align: center;">

Or you can add the same to the bottom of your Assets / timber.scss.liquid file as so

 

.section-header {
  text-align: center;
}

 

Best wishes!

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
pa3cia_m
New Member
8 0 0
Hi

It didn't work :(
0 Likes
KarlOffenberger
Shopify Partner
1867 182 803

Could you share the link to your store?

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
0 Likes
pa3cia_m
New Member
8 0 0
KarlOffenberger
Shopify Partner
1867 182 803

You added

 

style="textalign:center;"

Should be

 

style="text-align: center;"

Notice the hyphen in there.

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
0 Likes
pa3cia_m
New Member
8 0 0
Hi!

I just edited it.

Thanks

Will this also apply to collections title?
I'm checking at the collections now but they are also on the left side
alignment..


0 Likes
KarlOffenberger
Shopify Partner
1867 182 803

No, you only added the change in-line to the element on the page template itself. If you'd like to see title centred elsewhere too, you either need to apply the change on the corresponding templates or apply the change globally using the theme's stylesheet as I described in my initial response.

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
pa3cia_m
New Member
8 0 0
How do I do that? In the collections panel i mean to make it center..

Where can I find it?
0 Likes
KarlOffenberger
Shopify Partner
1867 182 803

Sections / collection-template.liquid

Liked this post? You might also like our fantastic upsell apps Candy Rack and Candy Cart or offer free gifts with Gift Box. All made with ❤️  and care by Digismoothie
0 Likes