Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

CSS for simple_form

andyl edited this page · 9 revisions

Here is some simple CSS to style your HTML forms...

/* ----- SimpleForm Styles ----- */

.simple_form div.input {
  margin-bottom: 10px;
}

.simple_form label {
  float: left;
  width: 100px;
  text-align: right;
  margin: 2px 10px;
}

div.boolean, .simple_form input[type='submit'] {
  margin-left: 120px;
}

div.boolean label, label.collection_radio {
  float: none;
  margin: 0;
}

label.collection_radio {
  margin-right: 10px;
  vertical-align: -2px;
  margin-left:   2px;
}

.field_with_errors {
  background-color: #ff3333;
}

.simple_form .error {
  clear:   left;
  color:   black;
  display: block;
  margin-left: 120px;
  font-size:    12px;
}

.simple_form .hint {
  clear: left;
  margin-left: 120px;
  font-size:    12px;
  color: #555;
  display: block;
  font-style: italic;
}

input.radio {
  margin-right: 5px;
  vertical-align: -3px;
}

input.check_boxes {
  margin-left: 3px;
  vertical-align: -3px;
}

label.collection_check_boxes {
  float: none;
  margin: 0;
  vertical-align: -2px;
  margin-left:   2px;
}
Something went wrong with that request. Please try again.