I am trying to center text and images inside a FRAME, but can only get horizontal centering to work.
I'd like to have the text I display in the frame be both horizontally and vertically centered.
I do not know the size of the frame (it's the "*" from the FRAMESET definition).
In another instance, I'd also like to have an image centered both horizontally and vertically, preferably also resized (keeping aspect ratio) to fill the FRAME area.
I know that FRAMESET is deprecated, but that's what I have to work with at this time. If you really want, you may answer with a (complete) setup that ends up with the same capabilities using non-frames, but that's beyond my knowledge at this time...
My FRAMESET definition is as follows:
<FRAMESET ROWS="50,*,110" BORDER=0>
<FRAME SRC="...">
<FRAME SRC="..." NAME="FullSize">
<FRAME SRC="...">
</FRAMESET>
It's an Image Viewer part of the web site. In the top FRAME is a "return to parent" link, and the bottom FRAME contains a horizontally scrollable list of thumbnails, which - when clicked - shows the image in full-size in the center FRAME. When first shown (before the first thumbnail click), I'd like a text neatly centered in the center FRAME that shows some information.
EDIT:
The bottom frame is a series of
<A HREF="ViewImage.asp?ID=###" TARGET="FullSize"><IMG SRC="GetThumb.asp?ID=###"></A>
The ViewImage.asp currently emits a simple html page with this structure:
<HTML>
<BODY>
<IMG SRC="Image###.PNG" ALIGN="CENTER">
</BODY>
</HTML>
What other elements/styles need to be in this ViewImage.asp output to also center it vertically, and if possible, resize it to fill the frame while maintaining aspect ratio?
The top frame is simply an
<A HREF="MasterPage.asp" TARGET="_top">Back to parent</A>
The middle frame, as I said, is the one I need help with. How do I center a text and/or an image (both vertically and horizontally) within that frame, given that I know neither the height nor the width of that frame? And - if possible - how do I ensure that the image in the frame is enlarged/shrinked to fit the size of the frame while keeping the aspect ratio intact?
EDIT 2:
Only partially solved. The centering now works, but not the optimal fitting to the frame size...