CodePen

HTML

            
                  <div class="message primary">Informational
    <div class="alert-close">×</div>
    </div>
    <div class="message success">Success
    <div class="alert-close">×</div>
    </div>
    <div class="message alert">Warning
    <div class="alert-close">×</div>
    </div>
    <div class="message warning">Error
    <div class="alert-close">×</div>
    </div>
            
          
!
via HTML Inspector

CSS

            
              .alert {
    background: url(../images/alert_icon.png) 10px 11px #DB7D07;
    background: url(../images/alert_icon.png) 10px 11px, -moz-linear-gradient(top, #F8971D, #DB7D07);
	background: url(../images/alert_icon.png) 10px 11px, -webkit-linear-gradient(top, #F8971D, #DB7D07);
	background: url(../images/alert_icon.png) 10px 11px, -ms-linear-gradient(top, #F8971D, #DB7D07);
	background: url(../images/alert_icon.png) 10px 11px, -o-linear-gradient(top, #F8971D, #DB7D07);	
	background: url(../images/alert_icon.png) 10px 11px, linear-gradient(top, #F8971D, #DB7D07);		
	background-repeat: no-repeat;
}
.primary {
	background: url(../images/info_icon.png) 10px 11px #0079a9;
	background: url(../images/info_icon.png) 10px 11px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #009ddc), color-stop(100%, #0079a9));
  	background: url(../images/info_icon.png) 10px 11px, -moz-linear-gradient(top, #009ddc, #0079a9);
  	background: url(../images/info_icon.png) 10px 11px, -ms-linear-gradient(top, #009ddc, #0079a9);
	background: url(../images/info_icon.png) 10px 11px, -o-linear-gradient(top, #009ddc, #0079a9);
  	background: url(../images/info_icon.png) 10px 11px, linear-gradient(top, #009ddc, #0079a9);	
	background-repeat: no-repeat;

}
.success {
	background: url(../images/check_icon.png) 10px 11px #629D34;
	background: url(../images/check_icon.png) 10px 11px, -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #7AC143), color-stop(100%, #629D34));
  	background: url(../images/check_icon.png) 10px 11px, -moz-linear-gradient(top, #7AC143, #629D34);
  	background: url(../images/check_icon.png) 10px 11px, -ms-linear-gradient(top, #7AC143, #629D34);
	background: url(../images/check_icon.png) 10px 11px, -o-linear-gradient(top, #7AC143, #629D34);
  	background: url(../images/check_icon.png) 10px 11px, linear-gradient(top, #7AC143, #629D34);	
	background-repeat: no-repeat;
}
.warning {
    background: url(../images/warning_icon.png) 10px 11px #D54119;
	background: url(../images/warning_icon.png) 10px 11px, -webkit-linear-gradient(top, #E85E39, #D54119);
    background: url(../images/warning_icon.png) 10px 11px, -moz-linear-gradient(top, #E85E39, #D54119);
	background: url(../images/warning_icon.png) 10px 11px, -ms-linear-gradient(top, #E85E39, #D54119);
	background: url(../images/warning_icon.png) 10px 11px, -o-linear-gradient(top, #E85E39, #D54119);
	background: url(../images/warning_icon.png) 10px 11px, linear-gradient(top, #E85E39, #D54119);	
    background-repeat: no-repeat;
}
.message {
	border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2) inset, 0 1px 0 rgba(255,255,255,0.1) inset, 0 1px 2px rgba(0,0,0,0.4);
    display: block;
    font-size: 10pt;
	font-weight: bold;
    margin: 0 0 15px;
    padding: 10px 10px 10px 35px;
    position: relative;
    vertical-align: middle;
	color: white;	
}
.alert-close {
	background: rgba(255,255,255,0.1);
	-webkit-border-radius: 50%;
	-moz-border-radius: 50%;
	-ms-border-radius: 50%;
	-o-border-radius: 50%;
	border-radius: 50%;
	-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4),inset 0 -1px 2px rgba(255,255,255,0.25);
	-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4),inset 0 -1px 2px rgba(255,255,255,0.25);
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4),inset 0 -1px 2px rgba(255,255,255,0.25);
	color: #FFFFFF;
	cursor: pointer;
	font-size: 18px;
	font-weight: normal;
	height: 22px;
	line-height: 24px;
	position: absolute;
	right: 11px;
	text-align: center;
	top: 9px;
	-webkit-transition: color 0.2s ease-in-out;
	-moz-transition: color 0.2s ease-in-out;
	-o-transition: color 0.2s ease-in-out;
	transition: color 0.2s ease-in-out;
	width: 22px;
}
            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              $(document).ready(function(c) {
	$('.alert-close').on('click', function(c){
		$('.message').fadeOut('slow', function(c){
	  		$('.message').remove();
		});
	});	
});
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................