While building a jQuery plugin I did not want the users to load images that would cause an issue with a modal window.
There are two CSS classes below one for a DIV container, then any image in that DIV should have a max-width of no more than 98%.
.rs-modal-window {
background-color:#000000;
border:2px solid #6A96B9;
border-radius:10px;
color:#D6D6D6;
display:none;
padding:5px;
margin-left:5px;
margin-right:10px;
min-width:210px;
max-width:500px;
min-height: 180px;
}
.rs-modal-window img {
max-width:98%;
}