I have the following code on my page:
<div style="width:200px;height:200px;overflow:auto; border:2px solid silver;">
<!-- Other HTML -->
<div style="..." Onclick="ShowHideDropDiv()">Drop-Down Title</div>
<div style="border:1px solid black; height:150px; overflow-y:scroll; display:none; position:absolute;" id="divDropDiv">
<!-- Loads of checkboxes -->
</div>
</div>
It is trying to emulate the behaviour of a drop-down-menu as much as possible, but allowing users to select multiple options using the checkboxes.
The problem is that when ShowHideDropDiv makes divDropDiv visible, it does not float nicely above the main div, it stays inside it, causing it to show a scrollbar - not very nicely user friendly!
How can I fix this, so that divDropDiv floats on top properly?
Please mark posts as the answer if I was helpful. Thanks!
Visit my blog