Administrators Nathan Posted December 12, 2013 Administrators Share Posted December 12, 2013 What's the best way to align text and a input field. With the below code everything works correctly, but the alignment of the text and the actual input fields are all over the place.You can see the example here:http://jsfiddle.net/gallitin/nsPdB/How can I make them all align evenly the best way? Quote Link to comment Share on other sites More sharing options...
Administrators Nathan Posted December 12, 2013 Author Administrators Share Posted December 12, 2013 Worked by putting my text in a label styled with display:inline-block and a set width - like so http://jsfiddle.net/nsPdB/1/ Quote Link to comment Share on other sites More sharing options...
OhioTom76 Posted January 12, 2014 Share Posted January 12, 2014 That's basically what I was going to suggest. It's not just about presentation, but also structure and accessibility. Here is a great rundown on best practices when creating HTML/CSS forms. http://net.tutsplus.com/tutorials/html-css-techniques/20-html-forms-best-practices-for-beginners/ There is also a Javascript/CSS library called Formalize that you might want to check out. It helps ensure your forms look consistent across multiple browsers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.