Home > CSS2, Web Standards > Simple error messages using divs and css

Simple error messages using divs and css

February 27th, 2009 ben Leave a comment Go to comments

I know this is common sense, but I something to share and this was the most relevant thing I could come up with. More and more I find myself using these simple divs to display error messages to the user.

<div class='error'>Blah Blah Unsuccessful</div>
<div class='success'>Blah Blah Successful</div>

And then the usual little bit of CSS to format the text (in relevant colours).

.error { color: red; margin: 10px; }
.success { color: green; margin: 10px; }

Simple but highly effective :)

Categories: CSS2, Web Standards Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Anti-Spam Protection by WP-SpamFree