I have a div with dynamic content. When the content loads in the div I want the div to resize to fit the content. But I want this resizing to have a maximum height. If the content needs more than this maximum height I’d like there to be a scrollbar.
I’ve searched through the questions here but haven’t been able to find what I’m looking for (apart from one where the question-asker replied saying he’d figured it out himself). I’ve read I can do it with jquery but I’m pretty new to that, but I did go through the demos of resizing a div, and changing classes and stuff like that but I’m really at a loss on how to implement what I’m looking for. I have tried to find a solution to this, so please be gentle.
1 Answer