Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Vertical-align doesn't work in inline elements but does work in tables (<a href="http://phrogz.net/css/vertical-align/index.html" rel="nofollow noreferrer">more details on vertical-align</a>). </p> <p>So here's a solution: I just wrapped the two main elements in the first <code>li</code> in a table row, and set the vertical align to bottom to force the 'recent data' label to the bottom. (There might be some way using the <code>display</code> property to change the <code>li</code> from an inline element?) </p> <p>You'll also need to tweak the padding on the <code>ol</code> and the <code>label</code>s and <code>table</code> tags so that everything lines up. In real life you probably use some sort of reset css to normalize the default style rules for all these different elements, so you might have to make different tweaks to get everything to line up perfect, but here's what I came up with.</p> <p><img src="https://i.stack.imgur.com/rteGy.png" alt="Altogether now"></p> <p>Altogether now:</p> <pre><code>&lt;style&gt; table,tbody,tfoot,thead,tr,th,td { margin:0; padding:0; border:0; outline:0; font-size:100%; vertical-align:baseline; background:transparent} body{line-height:1} ol,ul{list-style:none} table {border-spacing: 0px;} table td{ vertical-align: bottom; } * { font-size: 14px; font-family: Times New Roman, serif; } form label { width: 140px; float: left; } form ol li { background: #98c8dc; list-style: none; padding: 5px; margin-bottom: 2px; } form ol li:last-child { margin-bottom: 0px; } form li label{ padding: 4px 0 4px 0; } &lt;/style&gt; &lt;form&gt; &lt;ol&gt; &lt;li&gt; &lt;table&gt;&lt;tr&gt;&lt;td&gt; &lt;label&gt;Recent data&lt;/label&gt; &lt;/td&gt;&lt;td&gt; &lt;ol&gt; &lt;li&gt;3 99&lt;/li&gt; &lt;li&gt;5 98&lt;/li&gt; &lt;li&gt;15 97&lt;/li&gt; &lt;li&gt;28 96&lt;/li&gt; &lt;/ol&gt; &lt;/td&gt; &lt;/tr&gt;&lt;/table&gt; &lt;/li&gt; &lt;li&gt; &lt;label&gt;New data&lt;/label&gt; &lt;textarea placeholder="30 95" rows="4"&gt;&lt;/textarea&gt; &lt;/li&gt; &lt;/ol&gt; &lt;/form&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload