All things Shopify and commerce
Hello guys,
I am making a custom page but i am not able to find any solutions on how to change the width of custom page. I want to add 4 products or 5 products in one row but unable to do so cause of page width. https://mysticgleam.com/pages/crystal-encyclopedia
Solved! Go to the solution
This is an accepted solution.
{% if request.path == '/pages/crystal-encyclopedia' %}
<style>
.page-width--narrow {
max-width: 100% !important;
}
</style>
{% endif %}
Can you try this code @mysticgleam
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
- Here is the solution for you @mysticgleam
- Please follow these steps:
1. Go to Online Store --> Theme --> Edit code.
2. Open your theme.liquid file
3. In theme.liquid, paste the below code before </head> and press 'Save' to save it
<style>
.page-width--narrow {
max-width: 100% !important;
}
</style>
- Here is the result you will achieve:
- Please press 'Like' and mark it as 'Solution' if you find it helpful. Thank you.
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
I just want to change one page, apply this code change the width of all pages on my site.
This is an accepted solution.
{% if request.path == '/pages/crystal-encyclopedia' %}
<style>
.page-width--narrow {
max-width: 100% !important;
}
</style>
{% endif %}
Can you try this code @mysticgleam
If our suggestions are useful, please let us know by giving it a like or marking it as a solution.
Salepify: Efficiently increase sales conversion with sale-driven features like auto add to cart, free gifts (free plan available)
Salemate: Boost your AVO with 2-layer offer, countdown upsell in your post purchase page
Step 1: Go to Shopify Admin -> Online Store ->Theme -> Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above </head> tag:
<style>
#shopify-section-template--20699973353760__main .page-width--narrow {
max-width: 100%!important;
}
.section-template--20699973353760__main-padding .main-page-title {
padding: 0 20px!important;
}
</style>
Result
If it helps you, please like and mark it as the solution.
Best Regards 😍
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.
B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.
BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now
This code is not working
Could you show me the code you added to your theme.liquid file? Or you could try adding it to above </body> tag like this
B2B Wholesale Solution: Streamline your B2B operation with advanced features like wholesale registration forms, custom pricing.
B2B Portal, Quote, Net 30: Speed up purchasing and streamline your quotation process with advanced features like quick order, request for quote.
B2B Lock Password Protect: Easily control access to pages, products, and pricing with robust features.
BSS Commerce - Full-service eCommerce Agency I Use Shopify for 1$ in the first month now
Hello @mysticgleam
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 </body> on theme.liquid
<style>
section#shopify-section-template--20699973353760__main .page-width.page-width--narrow {
max-width: 100% !important;
}
</style>
my reply helpful? Click Like to let me know!
your question answered? Mark it as an Accepted Solution.
Here is the solution
To change the width of your custom page and fit 4-5 products per row, try setting a custom CSS rule. You can adjust the container width and set a flexible grid for your products:
```css
.custom-page {
width: 100%; /* or a specific width */
max-width: 1200px; /* adjust as needed */
margin: 0 auto; /* center the content */
}
.product-grid {
display: grid;
grid-template-columns: repeat(4, 1fr); /* Change 4 to 5 for five products */
gap: 20px; /* Adjust gap between products */
}
```
Make sure your container element uses the `.custom-page` class, and the products are inside a `.product-grid` wrapper. Adjust values to fit your design.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024