Sent by Tuttle Grey on 19 June 2002 11:11
Sorry for the repost, but I'm seeking opinion and information and perhaps
today will be a more active day on the list.
I have an absolutely positioned DIV. That DIV has a background image that
does not repeat. At resolutions of 800x600 or lower, the bg image is longer
than the viewport.
The are only a few lines of text in that DIV, but I want to "force" the DIV
to be long enough to render the entire bg image. Naturally the default
behaviour in IE and NN6 is that the DIV will only be as long as it needs to
be to display all contained text, so the bg renders partially.
I had planned to declare a height in pixels long enough to render the entire
bg image. For fun I first tried specifying DIV { height: 100%;}. What do you
know, it worked! Even though the bg image is longer than the viewport,
height:100% causes the DIV to lengthen just enough to render the entire
height of the bg image.
I recall lots of discussion about "height", notably being inconsistent
behaviour across browsers, and also the non-trivial question of just what
height:100% means - i.e. 100% of what? Is it meant to be 100% of the
viewport, 100% of the canvas, or 100% of something else? In this particular
case, IE5.5 and NN6.2 seem to take 100% to mean 100% of the height of the bg
image, which while convenient in my case is not what I would have expected.
So, I'm assuming that I can't leave it as height:100%, as I'm assuming that
some other browsers/versions will not render as IE5.5 and NN6.2 are doing,
and therefore I'm safer to specify a DIV height in pixels.
Is my assumption correct? Any comments or experience with setting % heights?
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com