…Whats the best way of positioning components in vaadin especially when using Java. I specifically trying to find out how to “center” align a form in a verticalLayout.
Is there documentation explaining alignments, positioning and so on.
Teddy L.
…Whats the best way of positioning components in vaadin especially when using Java. I specifically trying to find out how to “center” align a form in a verticalLayout.
Is there documentation explaining alignments, positioning and so on.
Teddy L.
Hey Teddy,
Both HorizontalLayout and VerticalLayout relies on [flexbox]
(https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Basic_Concepts_of_Flexbox).
You can center items in a VerticalLayout with either:
setAlignItems(Alignment.CENTER);
.align-items: center;
.