How to create: sticky notes

Learn how to use CSS to create 'sticky notes'.

Sticky Notes

Sticky notes can be used to notify users of special matters: danger, success, information, or warnings, etc.

Danger!Some text...

Success!Some text...

Information!Some text...

Warning!Some text...

Try It Yourself

How to create sticky notes

Step 1 - Add HTML:

<div class="danger">
  <p><strong>Danger!</strong> Some text...</p>
</div>

Step 2 - Add CSS:

.danger {
  background-color: #ffdddd;
  border-left: 6px solid #f44336;
}

Try It Yourself

Related Pages

Tutorial:How to Create Warning Message