I'm using the multiple-select jquery plugin for an select element. The outer div (containing the multiple-select box) has a max-height. If I open the multiple-select box it is cut-off and I have to scroll down to see all options:
$('select').multipleSelect();
#outer {
max-height: 110px;
overflow: auto;
background-color: green;
color: white;
}
#select {
width: 200px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/multiple-select/1.2.0/multiple-select.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/multiple-select/1.2.0/multiple-select.min.js"></script>
<div id="outer">
<p>
Below you find a multiple select box that should overflow the outer div.
</p>
<label for="select">Multiple select:</label>
<select id="select">
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four</option>
</select>
<p>
Scroll to the button when the select box is open.
</p>
<button>
Do nothing
</button>
</div>
If I open the multiple-select box all options should be visible. So the options should be overflow the outer div. How can I achieve this?
If I set the position of div.ms-parent to fixed I'm getting the desired behavior until I'm scrolling down, because the select box is fixed and not moving with the other content.
Using the z-index also not working in this case.