My question revolves around a fixed position div element whose height varies based on its content. In order to enable auto scrolling, I have applied the CSS property overflow-y: auto
and assigned a fixed height.
Is there a method to dynamically adjust the height of the div so that it changes in response to changes in available browser space? Ideally, I want the scroll bar to appear when space is limited and disappear when there is enough room for the content.