JSFiddle - React, Tailwind, and code Playground
by fxi
HTML
<div id="out">
<div id="in">
a
</div>
</div>
CSS
#in{
max-height: 100px;
column-width: 50px;
column-count: auto;
column-rule: 1px solid #ccc;
column-gap: 0px;
overflow:visible;
}
#out{
background:#ccc;
overflow:auto;
}
JavaScript
var elIn = document.querySelector("#in");
var txt = "";
for (var i = 0; i < 200; i++) {
txt = (txt + "p") + (i%10?' ':'') ;
}
elIn.innerText = txt;