There’s a simple CSS 3 hack to append to a div’s contents, to prevent it from height-collapsing regardless of whether it contains text or not. I just can’t find it again.
Where is it?
<div></div> <!-- nothing in it = will collapse -->
<div> </div> <!-- still nothing in it but with appended it won't collapse -->
<div>SOME CONTENT </div> <!-- "SOME CONTENT" is added via JS; -->
You may be talking about
:afterand:beforepseudo-elements and thecontentproperty.But why not to use
min-heightas Kolink suggested?As pointed in the comments, this appends as text, so the solution is to use the Unicode representation as a escaped sequence: