Jeff Thies wrote:
<span style="width:12ex; text-align: right">field label</span><input
type="text" ...>
(I suppose it may be better to do that with label.
Yes, it would.
I'm not really sure what that tag is about.)
< http://www.w3.org/TR/html401/interact/forms.html#h-17.9 >
that emulates this ever popular table layout (but is foldable):
<tr><td align="right">field label</td><td><input type="text"
...></td></tr>
What I don't remember is whether giving spans widths is legal or not?
No. Inline elements cannot have a width set.
This could be done with inline divs, but I seem to recall that either
isn't legal or Opera is not fond of them. Which is it?
I don't know about Opera. But declaring a div (or any block level
element) as inline would, I think, then preclude setting a width.
My advice:
use label, since it assigns semantic meaning to the input labels.
Float them left, essentially making them block level. Declare a
width. Note that, in NS6/Mac (and possibly NS6/Win), floating a label
element makes it disappear entirely! IIRC, putting the actual text in
a span element, and floating that fixes it. I can't find the post at
the moment. I'll continue looking, and post a link if I find it.
--
Brian
follow the directions in my address to email me