I have a div element with to resize:vertical
style on it. The contents of the div are generated, so it could be empty or filled. The div needs a max height, so that the height increases as new items are added, but it caps the size at 150px and makes the div scrollable.
I could easily accomplish that with the max-height
style, but if I want to resize it, it doesn't work.
The second idea I had, was to just use the height
style, but by doing this, the div's not adjusting its height if the contents are smaller than 150px.
Is there any way of doing this without javascript?