I am trying to create a fixed div that will expand in height as needed, filling the available space. If the content inside exceeds 100% of the height, I want it to be scrollable.
So far, my attempt has been with this CSS:
.container {
width: 300px;
max-height: 100%;
overflow-y: auto;
position: fixed;
}
Unfortunately, this approach has not worked for me. Is there a way to achieve this without setting a fixed size in pixels?