You may have noticed a small change in the Form Builder this week. You can now use 11 different styles for your web forms. A new stylesheet was kindly contributed by Patrick McNeil from Design Meltdown. The other additions are simple variations on the existing styles.
This update is a transition step toward a more flexible tool to manage the look&feel of your web forms. This tool will be available in the next release of the Form Builder later this year.
Feel free to leave a comment if you have any suggestions or problems with the look of your web forms. If you would like to contribute a stylesheet, please visit the Form Garden.
.duplicateLink, .removeLink (links generated by wForms’ Repeat behavior)
etc..
If you don’t use wForms, you can remove these definitions from the stylesheet.
CSS Conventions
Additionally, here are some of the conventions I adopted to allow for better control over the styling of a form.
The label position, relative to the field, is indicated by the classes .preField and .postField. For instance:
The primary action of a form, usually the submit button, is differentiated from less important actions (like cancel) by the use of the .primaryAction and .secondaryAction classes. The style for the .primaryAction class usually has a stronger visual weight (bolder or larger font for instance).
One last tip…
Vertical alignment of several fields can be achieved by using the width and inline-block CSS properties: .preField {
display: -moz-inline-box; /* inline-block for firefox */
display: inline-block;
width: expression('7em'); /* Min-width for IE6 */
min-width: 7em;
}
Note: The CSS shown accounts for browser discrepancies
That’s it for today. If you’d like to contribute to the Form Garden, email me your stylesheet and any associated images. Thanks!