[thelist] td and wrapping lots of images

Ben Henick persist1 at io.com
Tue Jan 22 16:32:35 CST 2002


On Tue, 22 Jan 2002, Shirley Kaiser, SKDesigns wrote:

> I would have thought that adding the carriage return would also do quirky
> things in certain browsers (such as NN4.x, for example).
>
> I'm also wondering if you really need to use a table to surround those
> images and could instead do this with CSS and divs instead.

This was something that came to mind as well.

> I agree with Ben's comment about specifying a specific width for the table
> cell, as that's generally the answer for eliminating the gap. BUT then it
> may permanently wrap that image or hold the width open for a horizontal
> scroll depending on the browser width.... and you're specifically wanting
> it to wrap 'when appropriate.'

There's the rub.  Netscape 3/4 are particularly notorious for refusing
under any and all circumstances to extend a table to a given width when
there's no content to fill that width... which is why I made the
suggestion that I did.  IE OTOH is *usually* pretty good about following
directions.

What you might try is to have a series of 1px-high transparent gif's,
without BR tags or whitespace in the markup, in a cell at the bottom of
the page such that the containing table will be forced to approximately
the needed width regardless of resolution... say, 37 or 38 images in
series, each with dimensions of 32x1 pixels.  If you're absolutely sure
that the user's gonna have JavaScript, you could even (oh the humanity!)
use document.write() inside of a for() loop to save bandwidth and
maintenance hassle.

Ultimately, though, you're probably better trying to pull this off with
CSS rather than tables.

> Did you try <td valign="left"> for the table cell with the images? Well,
> that may not alleviate it for all browsers either....

???  "left" isn't a valid value for the valign attribute.

> Care to share a URL?

Gotta agree with Shirley on this one.


-- 
Ben Henick
Web Author At-Large              Managing Editor
http://www.io.com/persist1/      http://www.digital-web.com/
persist1 at io.com                  bmh at digital-web.com
--
"Are you pondering what I'm pondering, Pinky?"
"I think so, Brain, but... (snort) no, no, it's too stupid."
"We will disguise ourselves as a cow."
"Oh!" (giggles) "That was it exactly!"





More information about the thelist mailing list