Streaming live at 10am (PST)

Changing color (of text, background etc) based on whether switch is turned on in CMS

Hi all,

Is is possible in webflow to change the color of a text element or the background of div in a collection list based simply on whether a switch is on or off?

With a div background, this can be hacked by absolutely positioning the a div with the desired color on top of the parent div and setting its visibility conditional to whether the switch is on, but is there an easier way (without the color field in CMS having to be manually set)?

And is it possible at all with text color? I’m wracking my brain to no avail.


Hi @moonworks,

This probably/most likely could be done, but it would all be custom code.

The process you described is probably the easiest and less complicated way of doing it.

Wish I had better news for you.

Happy Designing,

1 Like