I want a div to have as its minimum height the viewport height sans margins. The margins could be any unit, though preferably pixels.
I've been trying to achieve this for some time now, with no luck, even in a single browser (Firefox). Through Google, I've only been able to find examples where the content is 100% high with no margins above and below (e.g. http://css-discuss.incutio.com/?page=HundredPercentHeight). To clarify, these things should be true, assuming the div is white against a black body background: * There should always be black margins above and below the white div. * If there is little content, the white div should still fill the viewport height except for those margins. * If there is a lot of content, the white div should grow to fit the content, but there should still be black margins between the div and the very top and the very bottom of the entire page. If no-one here knows of a solution, I think I'll write some JavaScript to at least get the desired effect when scripting is enabled. Regards, -- Henrik Nyh http://henrik.nyh.se ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/