Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Csaba Gabor
September 22, 2009, 9:31 am
rate this thread
I would like to have like to have two elements on a page.
The bottom one should be a strip of some moderately
small height (.75in) which will hold a few buttons and
thumbnails, presumably something along the lines of
The rest of the page should be occupied by a canvas
to be painted by a single (non fixed size) image.
What's a proper html for this structure? The emphasis
is on the upper element expanding vertically to fill up
all the space not taken by the lower one. It will contain
an IMG element. Non fixed size means that images
may have different sizes, though usually they will be
portrait or landscape versions of a single (large) size
(4:3 aspect ratio).
I know this has been been addressed time and time again,
and I think I've dealt with it in the past, too, but right now I
can't find my old sources, and my searches results are
Csaba Gabor from Vienna
By a "canvas to be painted"? This suggests a bg image or possibly an
HTML img element set to stretch (but what has the aspect ratio mentioned
below got to do with it?)
So the picture that is in the top bigger portion of the page is separate
from the one that "paints" the background?
Perhaps you can clarify a little?
Correct. Whatever the containing element, it will contain
an image element that should fill out the containing element
to 100% in either a horizontal or vertical direction (assuming
that the image exceeds the size of the containing element
in one direction).
Whatever the aspect ratio is of the image, it should be
maintained (the 4:3 was offered only as a concrete example,
but it could just as easily be something else).
So specifically, one could imagine a control bar at the
bottom, and the rest of the space is filled with a single image
(there is no second background image). If the browser window
is stretched or shrunk, then the image changes to accomodate
the new size available to it.
I just realized that I am describing Windows Explorer's way
of looking at images under Alt \ View \ Filmstrip