Style object not available for container box

Hi all,

I am trying to call the style object of a container box but the dev console doesn’t recognize it as an object that is available for a container element. However the documentation here does look like it’s still valid.
https://www.wix.com/corvid/reference/$w.Style.html

My container box is in a repeater.

Here’s the link to my editor: https://editor.wix.com/html/editor/web/renderer/edit/84d598ad-fbcd-44d3-a190-68a1fc62a7f0?metaSiteId=04e192bd-dbd0-409f-bdf3-24ac944e5fff&editorSessionId=70a1474f-6de3-4a70-b4c7-a7271054bd73&referralInfo=dashboard

Thanks,
Fabian

You can only use style on the elements that are listed in the Wix API Reference for it as you have already seen.

Style

An object representing an element’s styles.
Elements that expose a style property can be styled programmatically. You cannot programmatically style elements that do not expose a style property.

The following elements expose the style property:

You are trying to do it in a container in a repeater as here.
https://www.wix.com/corvid/reference/$w.Container.html

To do this you have to write your code to suit repeaters and the use of them.
https://www.wix.com/corvid/reference/$w.Repeater.html

You can see examples of this on these pages here which should get your started.
https://www.wix.com/corvid/forum/community-discussion/how-can-i-change-repeater-item-background-color-based-on-click
https://www.wix.com/corvid/forum/community-discussion/setting-a-color-for-repeater-s-item
https://www.wix.com/corvid/forum/community-discussion/changing-repeater-container-background
https://www.wix.com/corvid/forum/community-discussion/change-the-colour-of-text-inside-a-repeater-instance-on-mouse-in-and-mouse-out-hover
…and other forum posts if you search…

Plus on these other sites too from Nayeli (Code Queen) and Vorbly
https://support.totallycodable.com/en/article/create-animation-on-one-repeater-item-at-a-time-using-wix-code
https://www.vorbly.com/Vorbly-Code/WIX-REPEATER-ANIMATE-INDIVIDUAL-ITEMS

Thanks for the reply GOS. I did search through the forums and it looks like the only way is to use a 1x1 pixel image to change the background colour.
In this case the word “container” used in the documentation for the Box element is a little confusing in the API documentation here: https://www.wix.com/corvid/reference/$w.Box.html

Or at least it doesn’t expose that object when is a repeater.

Thanks for the links.