My goal is an alignment as shown in the attached image (the fields on the left may have a
Yes, such alignment is possible. Using CSS classes, you can markup your HTML in such a way to achieve the same look of a table without the headache of using a table (or making the markup look ugly).
Using this CSS:
.label { display: inline-block; width: 100px; } .inputBox { width: 200px; }
and this HTML:
E-mail: Password:
you'll get the layout you want.
To do this with IE7 support, change the CSS above to this:
.label { display: block; width: 100px; float: left; clear: left; }
Then, add this line below the lines already shown:
Example using IE7-compatible settings: http://jsfiddle.net/bbXXp/