How to set up div's properties

Hi to all,

i’m using vaadin 8. I have two components in a VerticalLayout on wich i’ve set up on first the height to 200 px and on second the height to 100%.
The problem is that on browser the associated div to the components have the height set on 50%.
how do I set the properties of the divs?

Thank you.

Andrea

Which divs are you talking about? The <div class="v-slot ...? What is the effect you’re trying to achieve?

Hi Olli,

yes it is that tag. I’m trying to have the upper part of the layout made up of text fields with fixed height and the lower, made up of grid with variable height. I resolved this issue with an absolute layout. I added the components on layout with this method :

mainLayout.addComponent(filters,“top:5px: right: 20px; left: 5px;”);
mainLayout.addComponent(table,“top:227px; right: 5px; left: 5px; bottom: 5px;”);

This solution works, but i’m looking for an alternative.

Thank you

Andrea

Sounds like you’re missing on some details on how Vaadin 8’s layouting engine works. What you’re probably looking for is the expandRatio property; take a look at the chapter “expanding components” here: https://vaadin.com/docs/v8/framework/layout/layout-orderedlayout.html

Doesn’t work fine for me with expand ratio because the upper components of layout ( fixed size ) change their size and instead they must remain fixed. I don’t know if I explained well.

Okay, I’m maybe missing something about how you’d like it to work. Have you already watched the Layouting Basics training? https://vaadin.com/training/course/view/layouting-basics