How to detect a div height with filled content and get a pixel value

And set jQuery css with it as min-height that depends on how many text have on selected div?

var tsts = $('#tststs').height();
$('#test').css(
{
	'max-height': '1200px',
	'min-height': tsts
});

Is not wanna work for some reason but seems is fine not?

Any idea?

Thanks!

How is it not working? Can you provide a recreation of the issue through codepen or jsfiddle?