I need to set up forms where some input fields are mandatory and
others are optional. A common convention is to place an asterisk on
the labels of the mandatory fields. Of course, I can just hard code
these asterisks, but I'd have thought it would be better to use a CSS
element to control how a mandatory field should be marked. For example
(using a table to lay out the fields):
<tr><td class=mandatory >Label 1:</td><td><input ....></td></tr>
<tr><td class=optional> Label 2:</td><td><input ....></td></tr>
I cannot find out how to set up a CSS element so that a piece of text
is added to the content.
(I realise it can be done with the :BEFORE pseudo-element, but it
doesn't work in IE6, which is the primary browser amongst users of
this site).
Any suggestions gratefully received.
others are optional. A common convention is to place an asterisk on
the labels of the mandatory fields. Of course, I can just hard code
these asterisks, but I'd have thought it would be better to use a CSS
element to control how a mandatory field should be marked. For example
(using a table to lay out the fields):
<tr><td class=mandatory >Label 1:</td><td><input ....></td></tr>
<tr><td class=optional> Label 2:</td><td><input ....></td></tr>
I cannot find out how to set up a CSS element so that a piece of text
is added to the content.
(I realise it can be done with the :BEFORE pseudo-element, but it
doesn't work in IE6, which is the primary browser amongst users of
this site).
Any suggestions gratefully received.
Comment