This markup and CSS roughly achieves your stated goals under the restrictions for this question...
The Proposal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>My Form</title>
<style type="text/css">
#frm1 div {float: left;}
#frm1 div.go {clear: both; }
#frm1 label, #frm1 input { float: left; clear: left; }
</style>
</head>
<body>
<form id="frm1" action="#" method="post">
<fieldset>
<legend>Section One</legend>
<div>
<label for="field1">Name</label>
<label for="field2">Address, City, State, Zip</label>
<label for="field3">Country</label>
</div>
<div>
<input type="text" id="field1" size="15" />
<input type="text" id="field2" size="20" />
<input type="text" id="field3" size="10" />
</div>
<div class="go">
<input type="submit" value="Go" />
</div>
</fieldset>
</form>
</body>
</html>
The Merits
...but I would not recommend its use. The problems with this solution are
- the very annoying entire-column wrap at skinny browser widths
- it separates the labels from their associated input fields in the markup
The solution above should be (I haven't verified this) accessible-friendly because screen readers, I have read, do a good job of using the for=""
attribute in associating labels to input fields. So visually and accessibly-wise this works, but you might not like listing all your labels separately from your input fields.
Conclusion
The question as it is crafted -- specifically the requirement to automatically size the width of an entire column of different-length labels to the largest label length -- biases the markup solution towards tables. Absent that requirement, there are several great semantic solutions to presenting forms, as has been mentioned and suggested by others in this thread.
My point is this: There are several ways to present forms and collect user input in a pleasing, accessible, and intuitive way. If you can find no CSS layout that can meet your minimum requirements but tables can, then use tables.