If you need to create a Trello like kanban board with multiple lists and cards where you want to drag and drop cards between these lists you can make use of this awesome snippet by Niklas Rämö that uses muuri.js. You can drag and drop items as you please and the container will adjust its height accordingly.
If you are having trouble with the pen, try the archived copy on GitHub
Recreate Trello Snippet
See the Pen Muuri: simple kanban with scrolling containers by Niklas Rämö (@niklasramo) on CodePen.0