so i have bootstrap based site with fixed navigation bar (that follow you around the page at the top) and when i want to show modal popup, it appear behind those navigation bar,
I ran into this today and came up with an alternate solution that doesn't involve modifying the CSS. If you are using MVC, you can use a section tag and render the modal in the layout (anywhere in the body). This causes the default modal behavior to work and no longer hides it behind the nav bar.
On _layout.cshtml (inside the body tag):
@RenderSection("modals", required: false)
and in your view:
@section modals{
@Html.Partial("_MyModal")
}
Something similar would work in other languages and most importantly doesn't require modifying the CSS.