Change width for one specific page (DEBUT)

cientee
Tourist
5 0 1

Hello everyone!

As the title suggests, I would like to change or increase the width of one page, Contact Us page, and keep the rest of my website the original size. I hope someone will be able to assist me!! Thank you

 

website: cientee.com

password: tibbers4uu

0 Likes
ChoosiZon
Trailblazer
215 39 66

You can do like this :

 

Add this to bottom of page.liquid :

 

{% if page.handle == 'test' %}
<style>
#PageContainer{
  max-width:400px !important;
  margin:auto;
}
</style>
{% endif %}

Then change test to your page handle n 400px to the width you want.

dmwwebartisan
Shopify Partner
4373 980 1252

Hey there,

 

{% if page.url == '/pages/help-center' %} 
<style>
.page-width {max-width: 100% important;}
</style>
{% endif %}

add above code at top of the templates/page.conatct.liquid file
if you are using page template then add above code in templates/page.liquid

 

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
Moulinscalagran
New Member
1 0 0

What does a page handle mean?

0 Likes
suyash1
Shopify Partner
1945 194 294

@Moulinscalagran - please check URL in the browser, the page name is your page handle

you are welcome to contact me.
My email - suyash.patankar@gmail.com

#1 page builder app on Shopify - for FREE! PageFly
0 Likes
cdanielc
Tourist
15 0 1

Thanks for the solution! However, I run into an issue. I have added the below code to the page.liquid in order to control the max-width of one of my pages but noticed that the footer also is affected by the max-width. Is it possible to just change the width of the page content? 

 

{% if page.url == '/pages/about' %}
<style>
#PageContainer{
  max-width:700px !important;
  margin:auto;
}
</style>
{% endif %}

 

 

0 Likes
suyash1
Shopify Partner
1945 194 294
may be footer is part of the container, please check if you have any other
div tag with some class name which has page content.
you are welcome to contact me.
My email - suyash.patankar@gmail.com

#1 page builder app on Shopify - for FREE! PageFly
0 Likes