Prevent div growing/stretching when creating a dynamic grid
问题 I am working on a dynamic image grid, and I cannot get the grid to stay in a container. The idea is rather simple, add as many boxes to the container as I like, using jQuery, and as they are added, shrink them to fit the container without adding scroll bars, or running off the screen. This is working with adding columns but when adding rows it just keep running off the bottom of the screen. How do I fix the container div so as rows are added, the image shrinks instead of adding rows with