I need to show alert
to the user and I want it to be pretty. So I use Bootstrap's alert class, and show to user div
like this:
<div class="alert alert-warning alert-dismissible" role="alert">
Some text
</div>
This code just shows a div
. What I want is to darken everything, except this div
(like modals in Bootstrap do). How can I do this?
Opens the modal, only shows the alert.
http://jsfiddle.net/phLg32eL/1
HTML:
<!-- Button trigger modal -->
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
Open alert
</button>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="alert alert-warning alert-dismissible" role="alert">
Some text
</div>
</div>
</div>
</div>
CSS:
.modal-content {
height:52px
}
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