[thelist] CSS - label tag

Justin @ pxLabs justin at pxlabs.com
Sun Feb 13 13:42:09 CST 2005


Chris,

Is there a URL or some CSS code I can look at?

I use the label tag all the time, and I might be able to give you a 
helping hand.

Justin Kozuch
Creative Director, pxLabs
"Helping clients improve their business through the use of Web standards"
www.pxlabs.com

thelist at cjmarsh.com wrote:

>All
>
>I'm building a site that I want to validate according to the W3C CSS
>validator. I have a form with a number of text fields, and in order to
>maintain semantic integrity I have used the following markup:
>
><p>
><label>Field 1</label><input type='text' />
><label>Field 2</label><input type='text' />
><label>Field 3</label><input type='text' />
></p>
>
>I have constrained the width of the "p" tag, and so I want to specify
>the width of the label tags so that everything flows without any extra
>presentational markup. Everything is fine when I specify "display:
>inline-block" for the label tag, but this does not validate. Any other
>"display" value results in the width specified for the label tag being
>ignored.
>
>Can anyone suggest a solution that will validate?
>
>Many thanks!
>
>Regards
>
>Chris Marsh
>  
>


More information about the thelist mailing list