How to stop a flexbox (dialogbox/modal) to overflow the parent element which is position: absolute ?
Right now if you resize the window .modal will overflow the parent #modal and the window. I want to add overflow to the body element in the modal
https://jsfiddle.net/fdo8an4c/
<div id="modal">
<div class="modal">
<div>
body<br>body<br>body<br>body<br>body<br>body<br>body<br>body<br>body<br>body
</div>
<div class="modal-actions">
actions
</div>
</div>
</div>
#modal{
position:absolute;
z-index:1;
top:0;
left:0;
bottom:0;
right:0;
display:flex;
background:red;
}
.modal{
margin:auto;
padding:20px;
width:200px;
min-height:150px;
display:flex;
flex-flow:column wrap;
justify-content:space-between;
align-items:stretch;
background:#fff;
}
.modal-actions{
padding-top:10px;
text-align:right;
background:yellow;
}