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!
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)
That worked! Thanks so much!
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.
This is on our roadmap to add help for all bindable property
Thanks! This helped me get my margins working. +1 for tooltips on bindables / examples
tooltips have been added, but apparently something strange happen and they are not there anymore.
I am opening a ticket on our side to fix this