I have a modal with the contents taller than the browser height, as a result I have some contents which cannot be displayed. (seems like the modal position is fixed and cannot be scrolled as a whole)
How can I make the modal scrollable with the main page so that I can actually view the contents below?
I've tried
<div class="modal myModal"></div>
CSS
What you could do is set the modal's CSS
position
to absolute instead of fixed.To do this, just get the class name of the modal or ID like this and set it to
absolute
:Or, even better, edit the main CSS for your modal (if you can) and change the
position
fromfixed
toabsolute
.jsFiddle example: http://jsfiddle.net/hUNZs/