Hello, my question is this. let's suppose this code
<div>
<a>teste</a>
<a>teste</a>
<a>teste</a>
<a>teste</a>
</div>
This div is displayed when hovering a mouse, so here it is ok, but I checked on a site a similar case, but the div had many options when clicking on the dropdown menu, the div extends to the end of the screen, if the space is not enough to display all the content it generates a scroll, regardless of where the dropdown menu is located, the div extends to the end of the screen, type: if the user rolled the page and the button of the dropdown menu was left on the screen, clicking on the menu ... it makes the div go to this end of the screen .. showing few options and generating a scroll in the div, I am trying to make one equal , but if I put it to div have height auto, when I click on the menu ... it already shows all the content and extends the div off the screen and does not generate the scroll even with the overflow: auto, because the div with height auto is adjusted to the content and not the screen, I do not know if you could understand but in short, I want a div that extends only to the end of the screen, it fits the screen and never displays content that exceeds the visible part of the screen, in which case it has to create a scroll. I know that you can do a schematic with javascript, but I want to know if you have a simpler alternative that uses maybe just css.