Sent by Jin Kim on 27 February 2002 10:10
Some testing showed that this does not work in Mac IE 5 or 5.1.
The column will shrink in size if the browser width is narrowed.
As matter of fact if the browser width is larger than its height, the column
will actually extend down further, causing vertical scroll.
I seem to recall that height is somehow related to width... Though I can't
think of the exact definition.
I actually hope I did something wrong and that's why it's not working.
Here's the code for your review.
<html>
<head>
<style>
html, body {
height: 100%;
}
#testdiv {
position: absolute;
height: 100%;
width: 200px;
background-color: #cccccc;
layer-background-color: #cccccc;
font-family: Arial,sans-serif;
font-size: 12px;
padding:5px;
border:none;
}
</style>
</head>
<body>
<div id="testdiv">this div should have a height of 100%</div>
</body>
</html>
Jin
>> <style type="text/css">
>> html, body
>> {
>> height: 100% ;
>> }
>> </style>
>>
>> Granted, I won't be surprised if this falls apart with further, more
>> rigorous testing. But it may be a decent starting point.
>
> It's a great starting point-- I didn't mean to minimize or
> denigrate it! And I really hope it pans out in a cross-browser
> fashion. I'll be testing it in various versions of Netscape 6 and
> Mozilla, as well as all the Macintosh browsers I have lying around,
> and if it's workable I'll probably write it up as a technote for
> DevEdge. If your idea (which was excellent!) works out I think it
> will make lots of people like me a lot happier... because while I do
> try to explain the specification and its effects on browser behavior,
> that doesn't always mean I like what I'm saying. If you see what I
> mean.
>