Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to show a list of image thumbnails, and the user should be able to select one or more images from this list and then the selected images should be "best fit" displayed. For example, with 3 selections a triangular presentation should be used, with 4 selections a square, and so on.

share|improve this question
up vote 0 down vote accepted

I'd use jQuery with the jQueryUI add-on "Selectable".

Using this, make images selectable and customize the stylesheet to align your images and emphasize the selected ones.

Then, when images are selected, trigger a function that fits the images to your needs. You'll need to add your own logic to the fitting.

share|improve this answer
Thanks, your suggestion worked like a charm! =) – Samuel Jan 18 '12 at 1:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.