WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Forms marked with list elements

for

From: Sandra Clark
Date: Nov 8, 2006 8:50AM


Why add unneeded complexity? There has been css available for along time to
float labels and inputs without adding structure, (beyond a br tag).

<label for="idname">Label goes here</label>
<input id="idname" /><br />

input,
label,
select,
textarea{
float: left;
margin-bottom: .5em;
width: 20em;
}

label{
text-align: right;
width: 10em;
padding-top: .2em;
padding-right: 1.5em;
margin-bottom: 1em;
}
br{
clear: left;
}

Sandra Clark
=============================http://www.shayna.com
Training in Cascading Style Sheets and Accessibility