You could try to play with float
and clear
to push a text to next column
.
here is an example pushing a title to next column ussing css variable to reset height of the clearer.
//make this a function to fire on load and resize
var getIt = document.getElementById("test1");
var thisTall = getIt.offsetHeight + "px";
getIt.style.setProperty("--hgt", thisTall);
div {
column-count: 2;/* to use float properies within */
border: solid; /* see me */
column-fill: balance;/*not optionnal*/
/* min-height: could be used too */
}
div::before {
content: '.';
float: left;
min-height: var(--hgt);
/* see me */
width: 3px;
background: red;
}
h2, p::first-line {
clear: both;
color: red;
float: left;
width: 100%;
margin-top: 0;
text-align: center;
}
p {text-align:justify}
<div id="test1">
<h2>Title sent to next column</h2>
<p>!! the script is not fired on resize !! <br> Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est.
Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus
lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor,
facilisis luctus, metus</p>
</div>
or codepen to play with.
The text stands in first here , so it can be cleared from a floatting pseudo.