Although the Property inspector enables you to make simple edits to a Validation Text Area widget, it does not support customized styling tasks. You can alter the CSS for the Validation Text Area widget so that you can create a widget that is styled to your liking. For a more advanced list of styling tasks, see www.adobe.com/go/learn_dw_sprytextarea_custom.
All CSS rules in the topics below refer to the default rules located in the SpryValidationTextArea.css file. Dreamweaver saves the SpryValidationTextArea.css file in the SpryAssets folder of your site whenever you create a Spry Validation Text Area widget. Consulting this file is helpful because it contains commented information about various styles that apply to the widget.
By default, error messages for the Validation Text Area widget appear in red with a 1-pixel border surrounding the text.
Text to change |
Relevant CSS rule |
Relevant properties to change |
---|---|---|
Error message text |
.textareaRequiredState .textareaRequiredMsg, .textareaMinCharsState .textareaMinCharsMsg, .textareaMaxCharsState .textareaMaxCharsMsg |
color: #CC3333; border: 1px solid #CC3333; |
Background color to change |
Relevant CSS rule |
Relevant property to change |
---|---|---|
Background color of widget in valid state |
.textareaValidState textarea, textarea.textareaValidState |
background-color: #B8F5B1; |
Background color of widget in invalid state |
textarea.textareaRequiredState, .textareaRequiredState textarea, textarea.textareaMinCharsState, .textareaMinCharsState textarea, textarea.textareaMaxCharsState, .textareaMaxCharsState textarea |
background-color: #FF9F9F; |
Background color of widget in focus |
.textareaFocusState textarea, textarea.textareaFocusState |
background-color: #FFFFCC; |