{% example html %}
<div class="alert alert-warning alert-dismissible fade show" role="alert">
+ <strong>Holy guacamole!</strong> You should check in on some of those fields below.
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
- <strong>Holy guacamole!</strong> You should check in on some of those fields below.
</div>
{% endexample %}
//
.alert {
+ position: relative;
padding: $alert-padding-y $alert-padding-x;
margin-bottom: $alert-margin-bottom;
border: $alert-border-width solid transparent;
.alert-dismissible {
// Adjust close link position
.close {
- position: relative;
- top: -$alert-padding-y;
- right: -$alert-padding-x;
+ position: absolute;
+ top: 0;
+ right: 0;
padding: $alert-padding-y $alert-padding-x;
color: inherit;
}