I checked the FAQ, but didn't find an answer to this question. I also
checked the O'Reilly HTML and CSS books, with a similar lack of
results, though I could have missed something in the CSS book.
If a web page contains a long block of text, browsers will word-wrap
it to the width of the browser window. Similarly, a series of images
(<img src="...">) without any other tags will wrap to the width of the
browser window. In both cases, if the browser supports it, resizing
the browser window may cause the text or images to be re-wrapped
automatically.
I'd like to do the same thing with a series of small tables. Each
table contains a small thumbnail image and a caption. Each table
should be displayed at a more or less fixed size; the number of tables
that can fit across the screen depends on the size of the browser
window. I want the number of tables displayed on each row to depend
on the size of the browser window, as if each table were an image.
I know how to make the tables stack vertically (leaving lots of white
space to the right), or horizontally (forcing the user to scroll right
to see them all), or with a fixed number of items per row, but I don't
know how to make the number of items per row depend on how many will
actually fit.
I'm assuming a table for each image and caption is the right approach,
but perhaps I should be using something else.
(I suppose I could generate a JPEG image containing the thumbnail and
caption, but that's ugly; I want the caption to be searchable text,
and generating the composite images is more trouble than it's worth.)
Is there an easy and elegant way to do this? Is there an ugly and
difficult way to do it?
--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://www.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"