[thelist] CSS - label tag

thelist at cjmarsh.com thelist at cjmarsh.com
Sun Feb 13 14:15:30 CST 2005


Juston

> >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 

[..]

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

I cannot give a URL because it's a site under development for someone
else and it's not available to the public. Illustrative code is below -
I'm viewing it in IE6 on a PC. Thanks for your response!

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<style type='text/css'>
	p
	{
	  width: 400px;
	}
	label
	{
	  width: 200px;
	}
	input
	{
	  width: 200px;
	}
	</style>
	<p>
	  <label>Field 1</label><input type='text' />
	  <label>Field 2345</label><input type='text' />
	  <label>Field 34567890</label><input type='text' />
	</p>
</html>

Regards

Chris Marsh



More information about the thelist mailing list