{% set currentPageId = 'forms' %}{% set pageTitle = 'Forms - CastleCSS' %}{% include "inc/header.html" %}
This form example contains the default form elements with the recommend HTML structure.
The input is wrapped in a div with the class .formfield.
Wrap the input en button in a div with the class .input-combined
Add the classes .label-above, .label-top or .label-bottom to your field to adjust the position of the label. This not only works with inputs, but with textareas as well!
.label-bottom, .label-top and .label-above also work well with textareas. By default all labels are vertical-aligned in the middle. If you want to prevent this behaviour with textarea's you can add a parent class of .input-textareaAdd the class .label-left to a parent of the .input-checkbox.
Radios can be horizontal as well. Add the class .form-horizontal to a parent of the field(s) you want to make horizontal, as shown in the example below.
Add .form-horizontal to your form, field or label. The elements will be left-aligned.