I colour code of different form input fields, according to what their contents should be (mandatory/option/string/integer/float/etc) by using background an dborder.
I would like to have a table showing a key to this, with an example of each. However, some of them are only distinguishable by their borders (e.g, red border on a field which had invalid input when the form has to be resubmitted).
However, the table element <td>
hugs the <input type="text" ...>
.
It ought to be straightforward, but the box model has always confused me. How do make the table element border be, let's say 8 pixels, away from the input field, for instance, in this:
<td>
<input type="text" class="input_invalid" value="Error (value)" readonly>
</td>