I'm looking for the most efficient way to code a fairly simple html form layout I've done a mockup of.
So far I've thought of a number of ways to code this but they all seem rather cumbersome when implemented.
Basically what I'm trying to put into action is plain text aligned to the right and form imputes aligned to the left with a line in the center of both. Below is an image that should give an example of what I'm trying to achieve.
I recommend using the display values of
table, table-row, and table-cell
to keep the markup as semantically neat as possible: See this jsFiddleHere's one approach, though I think you could have helped yourself a great deal more, by showing previous attempts and explaining problems you had. However:
With the HTML:
JS Fiddle demo.
Here is a basic form with minimal style
HTML
CSS
Test http://jsfiddle.net/andresilich/qxMVd/
I have it like you wanted it: http://jsfiddle.net/XURye/
With the same colors and every position is correct too!
This minimal two selectors CSS from this Drupal post worked really well:
CSS & HTML http://jsfiddle.net/27cdz/3/