Floated thumbnail gallery, different sizes, how to handle?
12,902
Solution 1
I think the best solution is to give each thumbnail a div container with a fixed size, so that every thumbnail takes the same space. I mean, don't resize your thumbnails. The picture in the div should be centered.
Solution 2
None of the possible CSS solutions look particularly good.
I recommend using JavaScript+jQuery instead, specifically one of these plugins:
Solution 3
I have used following plugin, it's working fine :
http://suprb.com/apps/gridalicious/
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Author by
Admin
Updated on June 04, 2022Comments
-
Admin about 2 years
When simply doing float:left to all thumbnails of the same size, a gallery looks great. But when different size thumbnails come in to play, that is no longer the case.
What is the best way to handle different size thumbnails? Do I need to use tables instead?
-
Dónal over 12 yearsthose plugins are truly amazing
-
kleopatra over 10 yearsNote that link-only answers are discouraged, SO answers should be the end-point of a search for a solution (vs. yet another stopover of references, which tend to get stale over time). Please consider adding a stand-alone synopsis here, keeping the link as a reference.