expandRatio on content followed by footer

Hello vaadin community,

First of all, sorry if this has been answered before. I could find similar problems but nothing that was completely specific to my case.

I’m currently trying to set up a layout which will scale a verticallayout to fill all remaining space, leaving the footer at the very bottom of the page. This has been achieved with the following code:

public class DashboardAdmin extends Dashboard {
    public DashboardAdmin()
    { super();
    navBar = new NavBarAdmin();

It works, unless the window is short enough to start contesting for space, in which case the content component will overlap the footer. My original design was for the content and footer component to take up all space before the footer only if the content had blank space, otherwise it should be scrollable (along with the footer, I don’t want it to be sticky at the bottom). I’ve tried setting scrollable but that didn’t work.