- Platform information:
- OS: Win11
- Java Runtime Environment: 21.0.9
- openHAB version: 5.2.3
Hello,
I consider myself a beginner with OH. For a few days, I’ve been trying to solve an issue that’s driving me crazy. I simply want to have columns with the same height. Without using min-height or other workarounds.
This is simple (standard) HTML:
<html>
<head>
<style>
.col-container {
display: flex;
}
.col {
flex-grow: 1;
margin: 0;
padding: 10px;
}
</style>
</head>
<body>
<div class="col-container">
<div class="col" style="background:orange">
<p>Column 1</p>
</div>
<div class="col" style="background:green">
<p>Column 2</p>
<p>Hello World!</p>
</div>
<div class="col" style="background:yellow">
<p>Column 3</p>
</div>
</div>
</body>
</html>
and here is what I get:

Trying to simulate this on the main page (Overview) using code:
version: 1
pages:
page_2445414a10:
tags: []
props:
parameters: []
parameterGroups: []
component: oh-layout-page
config:
label: prova
slots:
canvas: []
default:
- component: oh-block
config: {}
slots:
default:
- component: oh-grid-row
config:
style:
display: flex
slots:
default:
- component: oh-grid-col
config:
style:
background-color: orange
flex-grow: 1
slots:
default:
- component: oh-label-card
config:
label: Column 1
- component: oh-grid-col
config:
style:
background-color: green
slots:
default:
- component: oh-card
slots:
content:
- component: oh-label-card
config:
label: Column 2
- component: oh-label-card
config:
label: Hello World!
- component: oh-grid-col
config:
style:
background-color: yellow
slots:
default:
- component: oh-label-card
config:
label: Column 3
grid: []
masonry: []
getting this:
I’ve tried every possible combination and option related to flexbox, but with no result.
So I copied the code and pasted it into a new widget (which is easier for me to use): the moment I replaced oh-row with div, everything magically fell into place.
version: 1
widgets:
zzz:
tags: []
props:
parameterGroups: []
component: f7-block
slots:
default:
- component: div
config:
style:
display: flex
slots:
default:
- component: div
config:
style:
background-color: orange
flex-grow: 1
slots:
default:
- component: oh-label-card
config:
label: Column 1
- component: div
config:
style:
background-color: green
flex-grow: 1
slots:
default:
- component: oh-card
slots:
content:
- component: oh-label-card
config:
label: Column 2
- component: oh-label-card
config:
label: Hello World!
- component: div
config:
style:
background-color: yellow
flex-grow: 1
slots:
default:
- component: oh-label-card
config:
label: Column 3
I cannot figure out what is causing this behavior. The generated code confirms that the container (class=“row no-gap”) is a flexbox:
Any suggestions? Thanks
Alberto


