I am facing an issue with a bootstrap modal that is embedded inside a faded div.
Strangely, once the modal is opened, it remains hidden behind the gray background, making it inaccessible.
Code
HTML
<div>
<button class="btn btn-primary" data-target="#normal" data-toggle=
"modal">Normal</button>
<div class="modal fade" id="normal" role="dialog"
tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
...
</div>
</div>
</div>
</div>
<div id="faded">
<button class="btn btn-primary" data-target="#faded-modal" data-toggle=
"modal">Faded</button>
<div class="modal fade" id="faded-modal" role=
"dialog" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">
...
</div>
</div>
</div>
</div>
CSS
#faded {
opacity: 0.7;
}
Results
Normal
https://i.sstatic.net/V6tXh.png
Faded
https://i.sstatic.net/bJNSb.png
Upon examining the example provided, you can observe that the first modal displays correctly while the second one (the faded modal) remains hidden behind the background, causing it to be inaccessible.
I need to resolve this issue without altering the HTML structure and maintaining the opacity on the parent element. This is just a simplified demonstration of the problem as there are other elements with similar fading effects applied.