I have a question about incorporating user input text into CSS styling. Specifically, I am looking to create a color background option (#ffffff) where the designer can input their own color and have it displayed once saved in the body background style.
While I have successfully implemented a method for the CSS to display an uploaded image through Liquid on Shopify, I am stuck on how to retain and utilize the user-inputted color code.
The current CSS snippet:
body {
background:{% if settings.use_Site_background %}url('Site_background.jpg'){% endif %} no-repeat /////This is where I need the color code/////// fixed top right;
}
This is what my Settings section looks like:
<tr>
<td><label for="Background_color">Background color</label></td>
<td><strong>#</strong><input name="Background_color" value="" id="Background_color" type="text" maxlength="6" /></td>
</tr>
If anyone has suggestions or an easier solution to achieve this, any help would be greatly appreciated!