Don't want to learn Bootstrap classes? Go to Bootstrap builder for busy developers.

Bootstrap class: .alert-dismissible

<div class="alert alert-warning alert-dismissible fade show" role="alert">
  <button type="button" class="close" data-dismiss="alert" aria-label="Close">
    <span aria-hidden="true">&times;</span>
  <strong>Holy guacamole!</strong> You should check in on some of those fields below.


Sass source

/* _alert.scss:29 */
.alert-dismissible {
  padding-right: ($close-font-size + $alert-padding-x * 2);

  // Adjust close link position
  .close {
    position: absolute;
    top: 0;
    right: 0;
    padding: $alert-padding-y $alert-padding-x;
    color: inherit;

Uses variables

/* _alert.scss:29 */