Web site background

I am creating a small web page, the background color is by default obviously just white.
There is no page.background.color = &RGB or something similar to change it (or depending on dark mode).
How can I change it, eg. in the Opening method? Is there a xojo way, or do I need to use html or javascript (which I don’t know well)?
And how about when assigning a background picture instead?

This placed in the opening event of your webPage for instance will give you an absolute disgusting green background :wink:

self.Style.BackgroundColor = &c00ff00

In the WebPages opeing event, you can use something like this:

me.style.BackgroundColor = color.Blue
me.Style.Value("background-image") = "url(//url.to/imgage.jpg)"

Cool, guys, thanks. The coloring works.

1 Like