Where to find element property format to use in bound formulas?

Hi, WeWeb is very powerful in that it allows you to bind element properties to formulas. However, where can one find the right way to specify the input? For example, it is easy to put in a margin (e.g. “20px” for all four sides, but how do we specify different margins for each side? The formula does not seem to take an array (e.g. [“0px”,“5px”,“10px”,“5%”]) for margins. Any help would be appreciated. Thanks!

1 Like

if you bind the value directly you need to output a strig that is a valid css value for that property.

For example you can check valid margin values here margin - CSS: Cascading Style Sheets | MDN (in your example you need a single string instead of an array of strings)

4 Likes

That worked! Thanks so much!

1 Like

Wonderful! :slight_smile:

@dorilama
Hi.

I am trying to use the guidance in this thread to add a top margin.

When I bind the margin to: “margin-top: 20px” it adds margin to left and right but not top.

When I paste the same in the element’s CSS it responds correctly.

Appreciate any guidance.

If you add custom css then it’s margin-top: 20px, but the value is not bindable.
If you bind the margin settings you need only the string with the values as specified in the link above (eg. ‘20px 0px 0px 0px’).

Thank you. Be great to have examples like this for all bindable properties. From my expereince, I beleive it would help a lot with No Code community.

2 Likes

This is on our roadmap to add help for all bindable property