# Photogallery with differing picture sizes

**URL:** <https://forum.kirupa.com/t/photogallery-with-differing-picture-sizes/188228>\
**Category:** flash\
**Created:** [May 5, 2006, 3:09pm UTC](https://forum.kirupa.com/t/photogallery-with-differing-picture-sizes/188228 "2006-05-05T15:09:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bgrossmann](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@bgrossmann](https://forum.kirupa.com/u/bgrossmann)\
**Post date:** [May 5, 2006, 3:09pm UTC](https://forum.kirupa.com/t/photogallery-with-differing-picture-sizes/188228/1 "2006-05-05T15:09:08Z")

</div>

I want to modify the following example to use pictures of different widths:

[http://www.kirupa.com/developer/mx2004/thumbnails.htm](http://www.kirupa.com/developer/mx2004/thumbnails.htm)

The thumbnail viewer will only correctly space the pictures if the thumbnails are all the same width. The equation just takes the width of a picture and creates and assigns an equally spaced position for each additional picture.

Say I had 5 pictures with the follow widths (in pixels):

100, 60, 120, 30, 80.

How can I modify the code to correctly space this pictures (with say 5 pixels space in between each picture)?

Thanks to anyone who can help!
