title: HTML columns or rows for form layout?
body: <p>I'm building a bunch of forms that have labels and corresponding fields (input element or more complex elements). </p>
  
  <p>Labels go on the left, fields go on the right. Labels in a given form should all be a specific width so that the fields all line up vertically.</p>
  
  <p>There are two ways (maybe more?) of achieving this:</p>
  
  <ol>
  <li><p><em><strong>Rows</em></strong>: Float each label and each field left. Put each label and field in a field-row div/container. Set label width to some specific number. With this approach labels on different forms will have different widths, because they'll depend on the width of the text in the longest label.</p></li>
  <li><p><em><strong>Columns</em></strong>: Put all labels in one div/container that's floated left, put all fields in another floated left container with padding-left set. This way the labels and even the label container don't need to have their widths set, because the column layout and the padding-left will uniformly take care of vertically lining up all the fields.</p></li>
  </ol>
  
  <p>So approach #2 seems to be easier to implement (because the widths don't need to be set all the time), but I think it's also less object oriented, because a label and a field that goes with that label are not grouped together, as they are in approach #1. Also, if building forms dynamically, approach #2 doesn't work as well with functions like <code>addRow(label, field)</code>, since it would have to know about the label and the field containers, instead of just creating/adding one field-row element.</p>
  
  <p>Which approach do you think is better? Is there another, better approach than these two?</p>