[Html-widget] Label synthax and CSS

Yves Räber yves.raber at obalis.com
Thu Nov 23 12:59:39 GMT 2006


Hello,

>From the W3C website (http://www.w3.org/TR/html4/interact/forms.html#h-17.9) I
see that the <label> element should be used like this :

<FORM action="..." method="post">
<TABLE>
<TR>
<TD><LABEL for="fname">First Name</LABEL>
<TD><INPUT type="text" name="firstname" id="fname">
<TR>
<TD><LABEL for="lname">Last Name</LABEL>
<TD><INPUT type="text" name="lastname" id="lname">
</TABLE>
</FORM>

But when creating a form with HTML::Widget, I get this kind of output :

<label for="widget_name" id="widget_name_label">Name
<input id="widget_name" name="name" size="60" type="text" value="sri"
class="Textfield" />
<span class="error_messages" id="widget_name_errors"></span>
</label>

The input element is inside the label element, and this is giving me a lot of
trouble creating a CSS to theme my forms.

And another thing ... where can I find a already done CSS that works with
HTML::Widget ? I tested simple.css, but it's really simple but not so pretty
(no alignment). I have to admit I'm not a CSS guru and this has probably
already be done many times.

Thanks

Yves.




More information about the Html-widget mailing list