Last active
October 19, 2017 13:58
-
-
Save desbest/4b7cfddabf8040aa2ea059357cf2f9be to your computer and use it in GitHub Desktop.
Different ways of displaying errors in validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Text Errors for validation | |
*/ | |
label { width: 10em; float: left; } | |
label.error { float: none; color: red; padding-left: .5em; vertical-align: top; } | |
p { clear: both; } | |
.submit { margin-left: 12em; } | |
em { font-weight: bold; padding-right: 1em; vertical-align: top; } | |
.required { font-family: Verdana, Arial, Helvetica, sans-serif; | |
font-size: 24px; | |
margin-right: 6px; | |
background-color: #CCCCCC; | |
border: 1px solid #666666; | |
} | |
/* | |
Visual Errors for validation | |
*/ | |
/* Validation */ | |
label.error { visibility: hidden; } | |
input.error, textarea.error, select.error { border-bottom: 3px solid #cc0000; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment