Almost everywhere else table cells are equally wide within a column. It doesn't work like this in my WAB widget. I suppose that's some bug/ feature in Jimu or in JS API, though it might have been triggered by integration into MVC. It's the same for table tag and for divs with display:table. Do it need to be div with some specific class, except for a custom one? One possible solution would be to set the width values, but this might make it ugly for column names much bigger/smaller than expected and making this part of CSS code locale-dependent is a lot of work. So how can I base the cell width on the widest content in the column?
Solved! Go to Solution.
I did it through min-width:
.jimu-widget-myWidget #main-form-table {
width: 100%;
min-width: 300px;
}
.jimu-widget-myWidget .col-head {
min-width:100px;
}
.jimu-widget-myWidget .col-cell {
min-width:200px;
}
This way the table looks like a table and it won't break if something is too long.
I did it through min-width:
.jimu-widget-myWidget #main-form-table {
width: 100%;
min-width: 300px;
}
.jimu-widget-myWidget .col-head {
min-width:100px;
}
.jimu-widget-myWidget .col-cell {
min-width:200px;
}
This way the table looks like a table and it won't break if something is too long.