Center the blog title

HELLO EVERYONE,

I would like to change the article title from the right to the center of the page. I want to have BRAND STATEMENT and the DATE in the center.

P.S: I use BLOGGLE app to create my blogs.
Store: https://400fdf-32.myshopify.com/

Password: MaisonMagdalena.222
How can I do that? Thanks a loooot :kissing_face_with_closed_eyes:

1 Like

Hello @MagdalenaBB

You can add code by following these steps

  1. Go to Online Store → Theme → Edit code.

  2. Open your theme.liquid file

  3. Paste the below code before on theme.liquid

article header.page-width.page-width--narrow{ text-align: center; }

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Hello There,

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find Asset > base.css and paste this at the bottom of the file:
.article-template .page-width--narrow {
text-align: center;
}

@MagdalenaBB

Please add the following code at the bottom of your css file.

//for desktop
@media screen and (min-width: 750px){
.article-template>*:first-child:not(.article-template__hero-container) {    
    text-align: center;
}
}

//for mobile
.article-template>*:first-child:not(.article-template__hero-container) {
    margin-top: calc(5rem + var(--page-width-margin));
    text-align: center;
}

Hope this helps.

Hello @MagdalenaBB ,

I understand you are looking to display the article title on the center of the page.

You can implement this change with the below-mentioned CSS code.

Add the code at the bottom of the theme.liquid file before tag and save.


Output -: https://prnt.sc/M1rs0uNx6FGm

I hope the code helps you.

Please share if you have any queries.

Thank you.

1 Like

AMAZING! Thank you! It worked :heart_eyes: