Learn how to create a responsive login form with CSS.
Tip: You can also use the following javascript to close the modal by clicking outside of the modal content (and not just by using the “x” or “cancel” button to close it):
_script_
// Get the modal
var modal = document.getElementById(‘id01’);
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = “none”;
}
}
_/script_
source