Liquid, JavaScript, themes, sales channels
Hi,
I need to create "Our story" page (to Shopify admin) and it needs some HTML/CSS skills. The Envy -themes page margins are way too wide for me.
When I change the margins on both sides (left & right) the mobile view change also - and it looks stupid.
Question: How can I change the page margins
<h5>This is the header</h5>
<p>h5 header and this paragraph should be the following way: desktop should contain 100px margins for both sides.
Mobile should have it's original margins - otherwise the page looks stupid if it has 100px margins in mobile also.</p>
Solved! Go to the solution
This is an accepted solution.
Hi @Kjankko-US
Add the following code to your HTML code on this page specifically:
<style>
@media (min-width: 1200px)
{
article#tehoaineet {
margin-left: 100px;
margin-right: 100px;
}
}
</style>
Let me know !
Hi @Kjankko-US
Would you mind sharing the preview of this page? We can then provide a code that only adjusts margins on that page without modifying the remaining pages!
Hi,
You can check the page with the following password:
URL: tervaskanto.myshopify.com
password: whawst
The specific page which needs narrow margins is: https://tervaskanto.myshopify.com/pages/tehoaineet
This is an accepted solution.
Hi @Kjankko-US
Add the following code to your HTML code on this page specifically:
<style>
@media (min-width: 1200px)
{
article#tehoaineet {
margin-left: 100px;
margin-right: 100px;
}
}
</style>
Let me know !
It works! Thank you @JHKCreate - you save my day!
If I want to create the same margins to other pages (/pages) - I assume that I can only copy this code and change the page name? Now it's "tehoaineet".
Yes indeed, that should do it @Kjankko-US !
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024