Most questions and answers about taking remaining height are focused on the content section on the page. I've tried several answers to my scenario but couldn't solve it.
I have a vertical layout with four elements.
<div class="col-sm-6" style="height: 350px">
<h1>Header Text 1</h1>
<h2>Header Text 2</h2>
<p>paragraph that should take the remaining space</p>
<a href="">Button</a>
</div>
The height is fixed and will be enough to accommodate h1
,h2
,a
. I want p
element to take the remaining space and display as may lines of text as possible in that space. If space is not enough it should display dots ...
or some indicator.
I tried to set a fixed height for the paragraph but that doesn't work because I don't know how many lines h1,h2
will take.