VerticalLayout sub-components sizing interaction issue

Hello all - I’ve been trying to get this to work for a while now and have pretty well given up, so any help would be greatly appreciated.

In my code, I have 3 basic components for my view: the header and the footer (both CustomLayout) and then between the two is a content window that switches as the user navigates the site. What I want is to have the footer stay at the bottom of the layout (can be offscreen) and have the content stretch to fill the space between the header and the footer, but always maintaining at least 100% of the screen size.

When I set the root layout to setFullSize(), the footer stays at the bottom and the view is always 100% of the screen size, but it’ll never be more - so if the user resizes the window too small, the content of the middle layout will spill over onto the footer/off the screen. If I don’t set it to full size, then when there isn’t a whole lot of content to display in the middle, the footer will be halfway up the page, though if you push arbitrarily long content, the footer will keep getting pushed down to fit the content, like one would hope for.

I’ve set the expansion ratios to .09/.71/.2 [weird numbers, looks right]
for header/content/footer setting each to 100% height, read through countless posts and tried countless things, but I still can’t get what feels like a fairly simple thing accomplished.

Here’s the general concept in code (inside the main class that extends UI):

final VerticalLayout layout = new VerticalLayout();
layout.setSizeFull();
setContent(layout);

    CustomLayout header = new CustomLayout("header");
    header.setHeight("100%");
    layout.addComponent(header);
    layout.setExpandRatio(header, 0.09f);

    VerticalLayout centerLayout = new VerticalLayout();
    centerLayout.addStyleName("center-layout");
    centerLayout.setSizeFull();
    layout.addComponent(centerLayout);
    layout.setExpandRatio(centerLayout, 0.71f);

    CustomLayout footer = new CustomLayout("footer");
    footer.setHeight("100%");
    layout.addComponent(footer);
    layout.setExpandRatio(footer, 0.2f);

I really hope it’s just me being dumb - thanks in advance!