I've seen a couple answers here and here but these don't help my case.
In my case, I have a container with scrollable content inside it:
.wrapper {
border: 1px solid grey;
width: 200px;
height: 200px;
overflow-y: scroll;
}
Among the content items, there are dropdowns that modify this content. These are regular bootstrap3 dropdowns, straight from the docs:
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Action <span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</div>
The question is - how do I make the dropdown contents visible while main text remains hidden because of overflow?
Regarding answers to similar questions: the dropdowns are part of the document flow, they are encountered here and there in different parts of the text, so I cannot position:absolute
them.
Fiddle here: https://jsfiddle.net/dfv59nuy/