I’m working on a similar content feature on a site and want to display two rows of 5 divs. Inside those, there will be a centered thumbnail and a title string below.
When I made my divs initially, they acted how I wanted. Each was the same height and width and I had two neat rows of 5 divs that were equal in height to each other. This all fell apart when I began adding content. My thumbnails are centered horizontally, and each div container is now a different height and starting vertically at different points.
Here’s the code in question. Just scroll down to “Similar Stuff” to see the problem divs.
display: table; is what you use when you want the layout to behave like a table, but you don’t want to actually use a <table> element.
There have been some recent threads on the subject:-