Align to the center with block

Solved
Klubo555
Explorer
51 0 20

Hi, I have one page which I created with pages. Is there some code that made my page look same way as all legal terms (like Refund Policy, etc.)? It is aligned like to the center with block? I can align it only to the center and that´s not what I´m looking for. Maybe code align-text: justify. Problem is that I don´t know where to put code to be suited with specific page.

How I want it: 

11.png

Page I want to be aligned like picture above: https://four-leggedpets.com/pages/policy-for-covid-19

Password is leden2021

 

Thank you for helping me

dmwwebartisan
Shopify Partner
4512 1014 1302

@Klubo555 

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

.template-page .rte{
max-width: 65ch;
margin: 0 auto;
}

 

Hope this helps.

Thanks! 

If helpful then please Like and Accept Solution.
Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Advanced Shopify Page Builder to customize your pages - check here PageFly App
Klubo555
Explorer
51 0 20

This code works, but for all custom pages. I'm trying to understand the code and I created a new one, but I changed it from page into page.alternate, name inside codes is page.alternate.liquid. I thought

that .template-page.alternate can work, but id didn´t.

Which code works for this specific page only (https://four-leggedpets.com/pages/policy-for-covid-19)?

Thank you 

dmwwebartisan
Shopify Partner
4512 1014 1302

@Klubo555 

Then as for the template-page. We will have to put id with the body tag.

Layout/theme.liquid

 

Find

<body class="template-{{ request.page_type | handle }}" >

replace with

<body id="{{ page_title | handle }}" class="template-{{ request.page_type | handle }}" >

 

After that body tag will have the id of the page then we can create CSS classes on it for that specific page. Please do this then we will move further.

 

If helpful then please Like and Accept Solution.
Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Advanced Shopify Page Builder to customize your pages - check here PageFly App
Klubo555
Explorer
51 0 20

I did 

Bez názvu.png

dmwwebartisan
Shopify Partner
4512 1014 1302

This is an accepted solution.

@Klubo555 

You can use this like below. Put this code for this page only.

body#policy-for-covid-19 .rte{
max-width: 65ch;
margin: 0 auto;
}

 

Now, this should work. The above id with the body is unique for each page.

Thanks! 

If helpful then please Like and Accept Solution.
Email: dmw.webartisan@gmail.com | Instagram: @dmw.webartisan
Advanced Shopify Page Builder to customize your pages - check here PageFly App
Klubo555
Explorer
51 0 20

Thank you, it works perfectly!