Space between two widgets

Hey there,

i want to “combine” to custom widgets. At the end they should look as the were one widget but in fact they are still two widgets.

Following simple Screenshot demonstrates my problem:

54

How could I eliminate the space between the two boxes? I tried the following option:

But even with a value of -10 the space still remains.

The code for the two widgets is just simple:
box1.widget.json (132 Bytes)

Does anybody have an idea or a hint what I can do to combine two of the widgets?

Greetings
Dominic

With the “don’t wrap in container” option unchecked on your custom widget instances, a 10px margin will be automatically applied. You can either enable it (but then the widget contents won’t be centered in the box) or use:

<div style="background-color: yellow; margin: -10px;">&nbsp;</div>

Then set the “Margin between widgets” to -1 (0 doesn’t work, which is a bug).

1 Like

I also found the Margin between widgets to 0 issue, here’s another workaround.

While using “don’t wrap in container”
I found that I was able to set the margin:
“widget_margin”: “0px”,
instead of:
“widget_margin”: 0,

By using the expert settings.

Tested this with the “openHAB 2.5.0~M3-1 (Milestone Build)” (a few behind the last official rollout).