[thelist] Re: site check, both barrels please.

johnpeace webshot at members.evolt.org
Tue Mar 12 21:28:00 CST 2002


> I tend to see it as bad practice to use spacer images with a non
> breaking space ( ) will achieve the same thing.

Ahh...but they *won't* do the same thing (i think)

When I need a one pixel think (high) horizontal rule between table elements,
I use a <tr><td> that spans as manny columns as I want, with a bgcolor
assigned to the <td> and a 1px x 1px spacer gif in the <td>. A &nbsp; won't
render at 1px high, it renders at 1 em high (or whatever the standard line
height/font size is), producing a decidedly different effect.

> 3) The use of these spacers can give different results in different
> situations (some browsers will ALWAYS replace a broken image object
> with a inset box and the ALT information for the image, if for some
> reason the spacer image isn't downloaded by the browser (just one
> time-out occurs and this happens) and all your spaces will be replaced
> with little inset boxes).

Hm, 'broken layout if the image doesn't download' seems to be the gist of
this argument. I can't think of too many layouts I've done for customers
that would *not* break if one of the images weren't downloaded...spacer.gif
or otherwise.

Of course, as we move to a XHTML/CSS world, the spacer.gif trick becomes
less and less useful. Frankly, I see it as a hack and a workaround that I'm
happy to see go by the wayside.

thanks,
John




More information about the thelist mailing list