Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2007
    Posts
    14
    Thanks
    0
    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)?

    Thanks.

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,861
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    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)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •