Taco Fleur wrote: > I have a form in which I'd like the following layout > > [form field aligned right] [text aligned left] > [form field aligned right] [text aligned left]
This is how I'd do it:
<form>
<table>
<tbody>
<tr>
<td><input type="text" name="login" id="login" /></td>
<th scope="row"><label for="login">name</label></th>
</tr>
<tr>
<td><input type="text" name="password" id="password" /></td>
<th scope="row"><label for="password">password</label></th>
</tr>
<tr>
<td colspan="2"><input type="submit" value="log in" /></td>
</tr>
</tbody>
</table>
</form>Or without tables if you must:
<style type="text/css">
dl{clear:both;margin:0;padding:0;width:15em;}
dt{clear:both;float:right;margin:0;padding:0;width:45%;}
dd{clear:left;float:left;margin:0;padding:0;width:45%;}
dd input{width:100%;}
p{clear:both;}
</style>
<form>
<dl>
<dt><label for="login">name</label></dt>
<dd><input name="login" id="login" type="text" /></dd>
<dt><label for="password">password</label></dt>
<dd><input name="password" id="password" type="text" /></dd>
</dl>
<p><input type="submit" value="log in" /></p>
</form>I'm shure you'll agree with me the tables way is the easy way.
Just out of curiosity I must ask why o why you wat those labels to the right.
--
Kristof
*****************************************************
The discussion list for http://webstandardsgroup.org/
*****************************************************
