Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello - i would like to add a 3rd option for a background color.
Specifically this is on the 'image with text' block on my home page.
I have got as far as making it appear in the drop down list:
But i know i am missing inputting some code somewhere as it doesn't change the colour of the section. And it removes the outline from the button.
Can anyone help me where i am going wrong?
pw@ weuhai
TIA
Solved! Go to the solution
This is an accepted solution.
div#shopify-section-template--15227863597206__1642071627e471f5a1 .\#floating-content-wrapper {
background-color: yellow !important;
}
@JKP84
try this code in the bottom of the assets/floating-content.css file
you can change your Background color using the custom code.
kindly Share Any screenshot on which section you want to change the background color.
Thank you
@Zworthkey thank you ...
Rather than just changing the colour of the background for a section, i would like to add an additional colour scheme 'alternate two' there are already 2 colour scheme options in my theme.
The section below (image with text) - i would like the background to be yellow on the block with the 'shop' button on.
sorry @Zworthkey that didnt work i'm afraid.
and this option will only allow me to change the background once to this particular section.
I am after a solution to create a NEW background color theme that can be applied to different sections....
This is an accepted solution.
div#shopify-section-template--15227863597206__1642071627e471f5a1 .\#floating-content-wrapper {
background-color: yellow !important;
}
@JKP84
try this code in the bottom of the assets/floating-content.css file
thank you @Zworthkey this worked for that section - but i would still love to know a solution to create a new color scheme option...
@JKP84
you have to learn about the Shopify liquid theme development.
only a developer can add this section.
@Zworthkey I have been able to add to the drop down as an option, i just needed a bit of help with the final bit. The option is there, but it doesn't change the colour, so i know I am missing adding it in somewhere.
thanks for your help.
@Zworthkey i have added the following into settings.scheme.json:
{
"type": "color",
"id": "color_background_3",
"default": "#FED700",
"label": "Alternate two background"
},
in settings.data.json, i have added the following under 'current':
"color_background_3": "fed700",
and in en.default.schema.json, i have added the following under the "image-with-text" section:
"options__6": {
"label": "Background 3"
},
and i have added the following into 'image-with-text.liquid':
{
"value": "Alt two",
"label": "Alternate two"
}
what i am missing presumably is to add into the section css file - can you help?
TIA