Fred wrote:
[color=blue]
> I've written a number of "image gallery" pages before, but I'm trying
> to do something a little different.
>
> All the images are rectangular (these are just pictures from my
> camera), and the thumbnail images I have are uniform in size in the
> sense that the longest dimension is fixed, and the shortest dimension
> is fixed. That is, if it's a horizontal image, the width is X, if
> it's a vertical image, the height is X.
>
> I used to create galleries like this by creating a table, all the
> table data elements were set to a fixed size so that there was some
> nice white space around each image, and each image is centered within
> the table data.
>
> Doing this looks fine, but it seems to me that, coming from a purists
> perspective, that limits the user in width of of the browser. In
> other words, if each table data is 200 width, then using 640x480 as a
> lowest common denominator says that I can only have three thumbnail
> images across.
>
> What I'd like to do is create a virtual box around each image so that
> the box size is, for example, 200x200 pixels. Whatever... some box
> known to be larger than the thumbnails, but uniform in height and
> width. The idea is that the page has a uniform appearance - images in
> a row are aligned in their center, even though some are vertical and
> some are horizontal, and images in each column (these are not table
> rows and columns, just boxes that will get aligned that way) will be
> aligned on center even though some are vertical and some are
> horizontal.
>
> Using my example, then, the browser would ideally show three images
> neatly in a row at 640, but if the user expands to 800 or more, it'll
> show 4 in a row, 1280 would show 6... this is supposed to be the
> design ideal for HTML, yet I can't figure out how to do it neatly with
> pictures.
>
> I even tried each image in a separate table, but not only is that very
> undesireable (tables kill rendering times, and we are talking about
> over 100 images), but it doesn't work - neither NS or IE is rendering
> multiple tables in a row. I might find a way to avoid this (<nobr>
> maybe), but then the browser doesn't know when it *should* break.
>
> Is there some way to do this? Maybe with stylesheets? For image,
> obviously width and height don't work, because that resizes the image.
> Padding and margins don't work, because some images are vertical and
> some are horizontal - the left and right padding for a horizontal
> image would be smaller than a vertical image - so it's not just white
> space, consider it uniform spacing on centers of the images.
>
> I could simply look at the size of each image, but I'm writing a perl
> script to write the HTML, and it'd be nice to keep it more generic.
>
> TIA,
> Fred[/color]
Consider this:
http://www.vladdy.net/demos/gallery.html
--
Vladdy
http://www.klproductions.com