How to remove bootstrap modal overlay for particular modal. when modal appears background has black color with some opacity is there any option for removing that elements...
10 Answers
43
votes
Add data-backdrop="false" option as attribute to the button which opens the modal.
<!-- Button trigger modal -->
<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal" data-backdrop="false">
Launch demo modal
</button>
See modal options
12
votes
10
votes
6
votes
5
votes
You can also do it this way if you trigger you modal from javascript, add the data-backdrop="false" to the modal directly Example Below:
<div class="modal fade" id="notifyModal" data-backdrop="false"
tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog modal-sm">
<div class="modal-content" id="info_content">
A Project has been deleted successfully!
</div>
</div>
</div>
2
votes
The background is fired with the following class: .modal-backdrop with an additional .in class for opacity.
Default values (edit as needed):
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
background-color: #000;
}
.modal-backdrop.in {
filter: alpha(opacity=50);
opacity: .5;
}
1
votes
0
votes
0
votes