I am having some styling problems with bootstrap.
I have a small modal window containing a dropdown. However I can't seem to get the dropdown to display over the footer of the window.
I have played with the zindex of the dropdown ensuring it was higher than the windows but no luck.
Can anyone suggest what I should be changing?
The html
<div class="modal hide fade" id="store-modal">
<div class="modal-header">
<h3 id="reward-title">Select Store</h3>
</div>
<div class="modal-body">
<p>
Please select the store you are working from
<div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">Select<span class="caret"></span></a>
<ul class="dropdown-menu">
@foreach (var model in Model)
{
<li>
<a href="#" class="store" data-id="@Html.DisplayFor(modelItem => model.StoreId)">@Html.DisplayFor(modelItem => model.StoreName)</a>
</li>
}
</ul>
</div>
</p>
</div>
<div class="modal-footer">
</div>
You just add a class having z-index
as attribute having higher than model box footer.
For z-index to work, you also have to set position = relative, absolute, or fixed. Also putting z-index something like 5000 might help. (the modal may have z index higher than the 2000's.
so in your css i would add this:
.class-of-dropdown {
position: relative;
z-index: 5000;
}
.modal-body class has a overflow-y: auto property. You might need to change this to:
.modal-body {
overflow-y:visible;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With