Shopify themes, liquid, logos, and UX
I have added a product grid with a border but it isn't centered.
Ideally, i would like the grid to bleed out to the edge?
Is this possible?
Thanks!!
Solved! Go to the solution
This is an accepted solution.
Hey @visualess
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
<style>
.collection .grid {
justify-content: center !important;
}
</style>
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
This is an accepted solution.
Hello @visualess
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>
.collection .grid{
justify-content: center;
}
.collection .grid--4-col-desktop .grid__item{
width: calc(26% - var(--grid-desktop-horizontal-spacing)* 3 / 4) !important;
max-width: calc(26% - var(--grid-desktop-horizontal-spacing)* 3 / 4) !important;
}
</style>
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
@visualess Hey, thanks for posting here.
can you please share the link to inspect it, thanks.
4qs.uk
password: 44444
This is an accepted solution.
Hey @visualess
Follow these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
<style>
.collection .grid {
justify-content: center !important;
}
</style>
RESULT:
If I managed to help you then, don't forget to Like it and Mark it as Solution!
Best Regards,
Moeed
Is there a way to make it so that the mobile version still stacks as a 2 product grid instead of 4?
This is an accepted solution.
Hello @visualess
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>
.collection .grid{
justify-content: center;
}
.collection .grid--4-col-desktop .grid__item{
width: calc(26% - var(--grid-desktop-horizontal-spacing)* 3 / 4) !important;
max-width: calc(26% - var(--grid-desktop-horizontal-spacing)* 3 / 4) !important;
}
</style>
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.
Is there a way to make it so that the mobile version still stacks as a 2 product grid instead of 4?
@visualess put this in css code :
.collection .grid {
justify-content: center;
}
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024