I have a modal with a backdrop overlay, this is my example:
https://codepen.io/tyrellrummage/full/XeRQYm/
(make the window smaller to see the top and bottom overflow).
Basically the structure is:
<div class="overlay">
<div class="modal">
//content
</div>
</div>
and the current styling:
.overlay{
display: flex;
align-items: center;
justify-content: center;
overflow-y: scroll;
}
.modal{
margin: 4rem 0;
}
this works for the bottom part of the modal, but the top part gets trimmed (cut out). How can I fix this only with CSS?