<div class="alert alert-error">
  <div class="alert-content">
    <h2 class="alert-title">
      It look like there was a problem.
    </h2>
    <div class="alert-body">
      <p>Please make sure to double check that the form below has all the correct information.</p>
    </div>
  </div>
</div>

<div class="alert alert-warning">
  <div class="alert-content">
    <h2 class="alert-title">
      We need more information before we begin.
    </h2>
    <div class="alert-body">
      <p>If you don’t submit this information by January 24 2019 there could be penalties and surcharges added.</p>
    </div>
  </div>
</div>

<div class="alert alert-success">
  <div class="alert-content">
    <h2 class="alert-title">
      Success!
    </h2>
    <div class="alert-body">
      <p>We’ve sent all your information to the agency and we’ll be in touch soon – there’s no need to worry.</p>
    </div>
  </div>
</div>
body {
  max-width: 600px;
  align-items: center;
  margin: 40px auto;
}

.alert {
  --theme: #ccc;
  --darkTheme: #777;
  --icon: '';
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  max-width: 600px;
  border-radius: 4px;
  background: var(--theme);
  border: 1px solid var(--darkTheme);
  display: flex;
  margin-bottom: 20px;
  
  &:before {
    content: '';
    width: 80px;
    position: relative;
    z-index: 999;
    background-color: var(--darkTheme);
    background-repeat: no-repeat;
    background-position: center 15px;
    background-size: 30px;
    background-image: url(var(--icon));
  }
}

.alert-content {
  padding: 20px;
}

.alert-title {
  margin: 0;
  margin-bottom: 5px;
  font-size: 18px;
  padding: 0;
  color: var(--darkTheme);
}

.alert-body {
  p {
    margin: 0;
    font-size: 16px;
  }
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.