JKP84
January 13, 2022, 12:39pm
1
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?
https://mojoandmuse.co.uk/
[email removed] weuhai
TIA
@JKP84
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
JKP84
January 13, 2022, 12:51pm
3
@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.
@JKP84
Go to Online Store->Theme->Edit code
Asset->/core **.css** ->paste below code at the bottom of the file.
div#shopify-section-template--15227863597206__1642071627e471f5a1 {
background: yellow !important;
}
@JKP84 Add this code in the bottom of the core.css file
thank you.
JKP84
January 13, 2022, 1:03pm
5
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…
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
JKP84
January 13, 2022, 1:11pm
7
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 if helpful accept our Solution.
@JKP84
you have to learn about the Shopify liquid theme development.
only a developer can add this section.
JKP84
January 13, 2022, 1:17pm
10
@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.
@JKP84
because color is not their in the option.
JKP84
January 13, 2022, 3:34pm
12
@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