Shopify themes, liquid, logos, and UX
Hello everyone,
I’m trying to remove all margins on this specific blog post page in my Shopify store using the Dawn theme. My goal is to make the content stretch fully across the width of the screen, with no extra spaces or margins.
I’ve tried modifying the CSS by adjusting the .page-width class and specifically targeting blog post pages, but the changes don’t seem to apply correctly. Here’s what I’ve tried:
.page-width { max-width: 100%; margin: 0; padding: 0; }
And also targeting blog posts with:
article.article-template { margin: 0 !important; padding: 0 !important; }
However, the margins persist, possibly due to default styles or other classes in the Dawn theme.
Does anyone have a precise method to remove the margins specifically on blog post pages without affecting the rest of the site?
Thanks in advance for your help! 😊
Solved! Go to the solution
This is an accepted solution.
Im not sure why your base.css have <style> tag that is not belong to the that file. You can add on the theme.liquid.
<style>
@media screen and (min-width: 990px){
section#shopify-section-template--22487101178184__main .article-template__content.page-width.page-width--narrow {
max-width: 100% !important;
padding: 0 5rem;
}
</style>
Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!
Hi @ShayP1
Try this one.
@media screen and (min-width: 990px){
section#shopify-section-template--22487101178184__main .article-template__content.page-width.page-width--narrow {
max-width: 100% !important;
padding: 0 5rem;
}
Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!
Thank for your solution but unfortunately that didn't work for me... Still trying to find how to do it.
This is an accepted solution.
Im not sure why your base.css have <style> tag that is not belong to the that file. You can add on the theme.liquid.
<style>
@media screen and (min-width: 990px){
section#shopify-section-template--22487101178184__main .article-template__content.page-width.page-width--narrow {
max-width: 100% !important;
padding: 0 5rem;
}
</style>
Your Feedback Matters! Please mark the solution and give likes to posts that helped you. Your appreciation fuels our motivation to assist you better!
Tks a lot! Works fine now. I'll remove the style tag in base.css
Best
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024