Here’s some CSS and HTML to make a textarea below a list of data points:
form label {
width: 140px;
float: left;
}
form ol li {
background: #98c8dc;
list-style: none;
padding: 5px 10px;
}
<form>
<ol>
<li>
<label><br/><br/><br/><br/>Recent data</label>
<ol>
<li>3 99</li>
<li>5 98</li>
<li>15 97</li>
<li>28 96</li>
</ol>
</li>
<li>
<label>New data</label>
<textarea placeholder="30 95" rows="4"></textarea>
</li>
</ol>
</form>
It renders like this:

How would you recommend I get it to line up just right?
Namely, “Recent data” should line up with the “28 96” line and, perhaps trickiest, the “30 95”, despite being in the textarea, should line up as if it’s just another row that comes after the “28 96”.
This is a good case for CSS positioning. Elements with
position:absoluteare positioned relative to their closest positioned parent. That means we can anchor the labels to the top/left of their containers usingposition:relativeon the<ol>, andposition:absoluteon the label.Example here: http://jsfiddle.net/YhQYS/1/
HTML:
CSS:
This is very simple to reason about, and reliable cross-browser. Note that you shouldn’t use a
<label>that doesn’t have a correspondent form control.But that stuff looks like tabular data… it’s your choice, we don’t have enough context to know what mark-up is more appropriate. So here is a more semantically correct approach using tables,
rowspanandvertical-align:HTML:
CSS:
Sample at http://jsfiddle.net/quqf8/1/