spicypedro – Member
I think I understand what you want to do. Do you want the line-height to automatically expand to the point that the text fills the entire height of its container?
There’s not really a reliable way of doing it, but theoretically, if you knew the number of lines of text (i.e. how much text and how it wrapped), and you knew the height of the container, you could do it like this:
https://codepen.io/peterjlambert/pen/dWmxrm
Here, I’ve set the height of the container to 900px and the width to 300px. With the font-size at 16px, the text wraps onto 15 lines. Setting the line-height to 900/15 makes the text fill the container vertically.
interesting that, didn’t know about the calc thing(is that css3? (Or some underlying javascipt library?) I may be limited in that respect to a few css3 features, so may not be available to me.)
The amount of text will also be variable, That’s the point of the auto really. So I can’t define the number of lines.