"Lorne Cameron" <> wrote in message
news:3ef9b95b$...
> I'm redesigning the gallery on my site so that when a thumnail is
> clicked, an HTML page is generated containing the image centered on the
> page. I have it working just using a few <BR>s and <CENTER> tags, but
> I'd like it to be truely centered both horizontally and vertically. So
> I tried having a table with WIDTH and HEIGHT at 100%, with
> ALIGN="center" and VALIGN="middle". It works fine when the image is
> small enough to fit in the window, but when it has to be resized it
> leads to problems. Here's what I have so far (border is inplace just
> now so that I can see what is happening - the extra height/width added
> by the border is negligable and is not the cause of the problem):
>
FWIW, I'd lose the document.write altogether for the table. Not needed.
<table><tr align="center" valign="middle"><td align="center"
valign="middle">
<img src="name.jpg" height="x00" width="x00">
</td></tr></table>
Where x could theoretically be the same and the image would adjust
accordingly.
So that if x was not the image size, it would still be sized in the same 4x3
format.
For thumbnails, 200x200 seems to work out just fine.
|