0

In my demo http://jsfiddle.net/batfafpf/2/ my modal is unscrollable even I set it to overflow-y:scroll. Not sure why, probably the fixed positin of the parent is causing the problem.

#dateTimeModal > div{
overflow-y:scroll;
}
1
  • When you give overflow you need to mention a certain height for the div too Commented Mar 4, 2015 at 8:42

4 Answers 4

1

The scroll event is not working due to two mistakes in style.

  1. Remove, pointer-events: none;
  2. make fixed height of your wrapper div.

Here is what it should be.

.modalDialog {
    position: fixed;
    font-family: Arial, Helvetica, sans-serif;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0,0,0,0.8);
    z-index: 99999;
    opacity:1;
    -webkit-transition: opacity 400ms ease-in;
    -moz-transition: opacity 400ms ease-in;
    transition: opacity 400ms ease-in;  
}

#dateTimeModal > div{
    overflow-y:scroll;
    height:50px;
}
Sign up to request clarification or add additional context in comments.

Comments

0

add overflow-y: scroll; to this class and remove pointer-events: none;

.modalDialog {
        position: fixed;
        font-family: Arial, Helvetica, sans-serif;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: rgba(0,0,0,0.8);
        z-index: 99999;
        opacity:1;
        -webkit-transition: opacity 400ms ease-in;
        -moz-transition: opacity 400ms ease-in;
        transition: opacity 400ms ease-in;

        overflow-y: scroll;
    }

Live Demo

Comments

0

As mentioned by the earlier poster, remove pointer-events: none. And change height to 100%.

Comments

0

You should set a height, to command browsers to make div able to scroll when the height set, exceeded.

#dateTimeModal > div{
    overflow-y:scroll;
    height: 200px;
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.