Hi there - I had a go with the below code, and it worked to a degree.
Now my div does in fact expand with my content, however one of the
other desired effects is to have the div still take up 100% of the
viewport even when the content was small.
Any other suggestions?
> On 16-Dec-05, at 4:57 AM, Zoe M. Gillenwater wrote:
>
>> Gunlaug Sørtun wrote:
>>
>>> Dustin Krysak wrote:
>>>
>>>
>>>
>>>> ... I know this can be controlled with the overflow attribute -
>>>> HOWEVER.. .I want my layers to expand with the content.
>>>>
>>>>
>>>
>>> Something like...
>>>
>>> html {height: 100%;}
>>> body {min-height: 100%;}
>>> * html body {height: 100%;}
>>>
>>>
>>>
>>
>> Just to explain Georg's code here...
>>
>> The reason why your borders ended at the bottom of the browser
>> window,
>> Dustin, is that you told them to. You told your div to be 100% of
>> the
>> body element, which should be 100% of the viewport. Since you didn't
>> use min-height, you were telling your div to be the size of the
>> viewport
>> and that's it. When the viewport ended, your div was ending.
>>
>> Georg's CSS fixes this by using min-height of 100% on the body. This
>> means that the body element can stretch down past the end of the
>> viewport, and your div inside can too since it's still set to height:
>> 100%. The third line in Georg's CSS is a hack to feed height: 100%
>> back
>> to IE. IE doesn't understand min-height, but it treats height just
>> like
>> it, so this works out fine. You may consider keeping this hack in an
>> IE-only sheet fed through Conditional Comments.
>>
>> Hope that helps,
>> Zoe
----------
Dustin Krysak
Backbone Technology Inc.
604.713.8560
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/