working with (css) borders

hi all, i have a lot of problems using borders (css borders) in vaadin - every time i tried to add border i messup some layout/panel size calculation, what is the proper way in vaadin to add borders?


You can’t use borders with the core layouts easily, when using explicit sizes (percent or pixel), since borders, paddings and margins are not calculated to the size of the layout. Only CssLayout let’s you add those when using 100% width, but not much more.

Other components do support borders somewhat, I suggest you look from the core themes in which parts borders are used and go from there. But trial and error is also a well used approach :slight_smile:

To have easier time adding borders, margins and paddings to layouts, use the
DashLayout add-on
for instance.

And do vote for the excellent enhancement ticket that directly addresses this issue: