<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/assets/reset.css" rel="stylesheet">
<link href="setup.css" rel="stylesheet">
<link href="style.css" rel="stylesheet">
</head>
<body>
<ol>
<li>
<p>Item 1</p>
</li>
<li>
<p>Item 2</p>
</li>
<li>
<p>Item 3 with more text</p>
</li>
<li>
<p>Item 4 longer</p>
</li>
<li>
<p>Item 5 too</p>
</li>
<li>
<p>Item 6</p>
</li>
</ol>
<ol>
<li>
<p>Item 1</p>
</li>
<li>
<p>Item 2</p>
</li>
<li>
<p>Item 3 with more text</p>
</li>
<li>
<p>Item 4 longer</p>
</li>
<li>
<p>Item 5 too</p>
</li>
<li>
<p>Item 6</p>
</li>
</ol>
<ol>
<li>
<p>Item 1</p>
</li>
<li>
<p>Item 2</p>
</li>
<li>
<p>Item 3 with more text</p>
</li>
<li>
<p>Item 4 longer</p>
</li>
<li>
<p>Item 5 too</p>
</li>
<li>
<p>Item 6</p>
</li>
</ol>
<ol>
<li>
<p>Item 1</p>
</li>
<li>
<p>Item 2</p>
</li>
<li>
<p>Item 3 with more text</p>
</li>
<li>
<p>Item 4 longer</p>
</li>
<li>
<p>Item 5 too</p>
</li>
<li>
<p>Item 6</p>
</li>
</ol>
</body>
</html>
ol {
display: flex;
flex-wrap: nowrap;
min-height: 120px;
}
ol:not(:first-child) { flex-wrap: wrap; }
ol:nth-child(3),
ol:nth-child(4) {
flex-direction: column;
}
ol:nth-child(4) { max-height: 120px; }