DEV Community

Discussion on: Creating a CSS modal window (pop-up) step-by-step

Collapse
 
supersmartat profile image
Andreas Huber

If anyone needs a quickfix - i used the onclick to fix this background closing. It not plain css of course, but it improves usability for my application:

I extended the same logic with
<div id="modal" onclick="location.href='#'"; >
finally the grey background closes like the X before.