Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Right-aligned form fields
10-07-2007, 06:36 PM #1
- Join Date
- May 2007
- Thanked 0 Times in 0 Posts
Right-aligned form fields
I'd like to have several form fields and text describing them right-aligned. Meaning that all the text boxes would be right-aligned, in one neat row. Then there'd be labels for each text box to the left of the text box, but right-aligned against the text box. (If I haven't described it clearly I can describe it better.)
The only way I've been able to do this is by having <input><span>, then floating both to the right. Because input appears in the markup first, it'll get floated to the right first, giving the desired effect. My question is whether it's possible to create this design by placing the span before the input in the markup.
After all, it doesn't seem intuitive that input appears before span in the markup but span appears before input in the rendered page. How can I achieve the desired effect with the markup representing the structure rather than the design of the page (i.e. span before input in markup)?
10-07-2007, 07:05 PM #2
- Join Date
- Mar 2007
- Thanked 2,224 Times in 2,211 Posts
If you post your curent code, the picture would be more clear!
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)