
body {
	padding-top: 100px; /* demo only */
	text-align: center; /* center content in IE */
}

fieldset {
	font-family: "Trebuchet MS", Arial, sans-serif; /* pretty font */

	width: 600px; /* limit width */
	background: #cef; /* neutral colours */

	padding-top: 25px; /* replicate general row spacing */

	margin: 0 auto; /* center on page */
	text-align: left; /* reset text alignment */

	position: relative; /* allow re-positioning the legend */
}

fieldset label {
	display: block; /* block layout is necessary */
	overflow: visible; /* deal with verbose labels */

	margin-top: 4px; /* try to match input text baseline */
	height: 30px; /* sensible non-zero height due to IE6 overflow bug */
	margin-bottom: -34px; /* shift following content back up */

	line-height: 1; /* compress vertically if overflowing lines */

	margin-left: 15px; /* left spacing to match standard row spacing */
	width: 185px; /* label "column" width minus left spacing */

	text-align: right; /* right-align for readability */
	color: #446; /* reduce contrast */
}

fieldset input,
fieldset select,
fieldset textarea,
fieldset .help-text,
fieldset .error-text,
fieldset button {
	margin-left: 210px; /* label "column" width plus spacing */
	margin-bottom: 25px; /* standard row spacing */
}

fieldset input,
fieldset select,
fieldset textarea {
	border: 1px solid #88b; /* ensure consistent border style */
	width: 300px; /* consistent width - allowing for padding variations */
}

fieldset textarea {
	height: 5em;
}

fieldset .error input,
fieldset .error select,
fieldset .error textarea {
	border: 1px solid #f00; /* highlight inputs with errors */
}

fieldset .help-text,
fieldset .error-text {
	margin-top: -25px; /* cancel out standard row spacing */
	font-size: 80%; /* auxiliary text is smaller */
	line-height: 1.1; /* vertically compact */
}

fieldset .help-text {
	color: #668; /* help text is subtle */
}

fieldset .error-text {
	color: #f00; /* error text is red */
}

fieldset button {
	width: 150px; /* make the button stand out */
	height: 40px; /* make the button stand out */
}

