CSS Viewport Height (vh) minus Pixels (px)

I’m trying to stretch elements to the entire viewport height minus the footer at the bottom.

I’ve browsed the forums for a while and I think I’m very close.

The solution seems to be to set an HTML with the following code.

< style>
#list {
height: 100vh !important;
}
< /style>

Which successfully stretches the element (element ID = list) to the entire viewport size. Now, I want to subtract a set number of pixels (footer height).

What is the code?

I’ve tried the following:

height: 100vh - 100px !important;

height: (100vh - 100px) !important;

height: calc(100vh - 100px) !important;

height: calc(“100vh - 100px”) !important;

height: calc(~“100vh - 100px”) !important;

As you can see I’m kinda just shooting in the dark based on what I can find online.

Anyone know the right code to put here?

I think the solution might be to get the viewport height in pixels and then calculate with pixels only