need help with dynamic background

0
I need some advice for my dynamic background, currently i have a simple profile page just like the community profile from Mendix (see link below). I want users to be able to determine their own background picture which they can upload. The way i build it right now is 2 dynamic image viewers, one with the background image and one with the profile image and there is a container with some other elements on the page. I make it all align by using a big margin minus on all the other elements to shove it above the background image but i wonder if there is a better way of doing this because this will for sure give problems in the future.  https://imgur.com/a/L0XoN
asked
1 answers
0

Hey Hunter,

With the Format String widget (see App Store) you could create a HTML snippet that includes some JavaScript or CSS that overwrites the background image of a certain DIV with an id. Like this:

document.getElementById("specificID").style.backgroundImage = "url('img_tree.png')";

By using the Format String widget, you can use object variables in there (like the file path of the image).

Kind regards,

Bas.

answered