All things Shopify and commerce
Hello, I need help changing the background color of two sections on a specific page. When I try to change the background color from white to #ECE3E3, it only changes the color of the section's background and not the main #MainContent section. There is still a gap of the white color of the #MainContent section. Also, when I change the main #MainContent color, it changes on all pages. I only want to change the color on a specific page.
Page link: https://it3c4l97jlh53jxv-85198045527.shopifypreview.com/pages/bundle
Password: wellness
I try to use this code:
<style>
{% if template == 'page.bundle' %}
.animate--hover-3d-lift {
background: #ece3e3 !important;
}
{% endif %}
</style>
Solved! Go to the solution
This is an accepted solution.
Oh, It didnt listen. I did remove that one. Thats is a margin from the inner grid.
try this one.
.Influencers-main .Influencer--inner {
margin: 0px !important;
}
If you are familiar with the code. Change this.
To the above I provdie. Or better to replace for this.
div#shopify-section-template--23432765735255__influencer_HxdPEB .Influencers-main {
background: #ece3e3 !important;
}
section#shopify-section-template--23506589319511__main {
background: #ece3e3 !important;
}
div#shopify-section-template--23506589319511__influencer_bDnBnk .Influencers-main {
background: #ece3e3 !important;
}
.Influencers-main .Influencer--inner {
margin: 0px !important;
}
And save.
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
Hi @Ammzish
You can also use the section id.
Check this one.
From you Admin page, go to Online Store > Themes
Select the theme you want to edit
Under the Asset folder, open the main.css(base.css, style.css or theme.css)
Then place the code below at the very bottom of the file.
div#shopify-section-template--23432765735255__influencer_HxdPEB .Influencers-main {
background: #ece3e3 !important;
}
section#shopify-section-template--23506589319511__main {
background: #ece3e3 !important;
}
div#shopify-section-template--23506589319511__influencer_bDnBnk .Influencers-main {
background: #ece3e3 !important;
}
.Influencer--inner {
margin: 0;
}
And Save.
Result:
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
@Made4uo-Ribe Thank you for the reply with the solution. I added the code you provided in the base.css and it changed the background color, but the issue is the same. there's a white gap of #MainContent and I want to change the color for it as well, or remove it.
https://it3c4l97jlh53jxv-85198045527.shopifypreview.com/pages/bundle
This is an accepted solution.
Oh, It didnt listen. I did remove that one. Thats is a margin from the inner grid.
try this one.
.Influencers-main .Influencer--inner {
margin: 0px !important;
}
If you are familiar with the code. Change this.
To the above I provdie. Or better to replace for this.
div#shopify-section-template--23432765735255__influencer_HxdPEB .Influencers-main {
background: #ece3e3 !important;
}
section#shopify-section-template--23506589319511__main {
background: #ece3e3 !important;
}
div#shopify-section-template--23506589319511__influencer_bDnBnk .Influencers-main {
background: #ece3e3 !important;
}
.Influencers-main .Influencer--inner {
margin: 0px !important;
}
And save.
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
Also, can I ask if there is a way to change the color of all influencer sections on a specific page? https://it3c4l97jlh53jxv-85198045527.shopifypreview.com/pages/bundle
Try the code you have.
<style>
{% if template == 'page.bundle' %}
.Influencers-main {
background: #ece3e3 !important;
}
{% endif %}
</style>
And Save.
I think you already knows where this will be paste.
Please don't forget to Like and Mark Solution to the post that helped you. Thanks!
I insert this code in base.css but it's also changing colors from other pages section.
If it is, the template code that your using 'page_bundle' is not on the json template.
@Made4uo-Ribe For clarification: the code is changing color from all sections on the site
Oh, You already add password in your site. I just like to check it again.
I had a wonderful online shopping experience. Sattva Songbird the checkout process was quick and easy, and the product variety is excellent. My order was precisely what I ordered, and it arrived swiftly. Strongly advise everyone searching for excellent and high-quality services
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