On 8/30/05, Bob Easton <[EMAIL PROTECTED]> wrote: > Ron Adams wrote: > > I have 2 divs on a page, and the top one is an unknown size, the bottom > > one must fill the rest of the space to the bottom of the browser window. > > How do I do this with CSS? > > > > A simplyfied example below. > > You can't. Divs expand to the height of their content (plus padding and > margins), and no further. To fill a space, you need to put something of > that height inside the div, or set the div to that explicit height. If > you don't know the height, find a JavaScript script to do it for you. > Our WIKI has examples: > http://css-discuss.incutio.com/
This is a real issue and one that should have been addressed by the CSS spec. Setting a table to 100% high in IE in quirks mode makes the table the height of the screen, a really useful feature. This isn't available in standards mode, and there is *no* equivalent in a tableless design. Why is there a need to supply a fixed value height at some point in the hierarchy - why not just take the hight of the body as the fixed value? (And, it certainly doesn't work to specify html, body { height: 100% } - that's just silly - since when should the <html> tag need a height?) Does anyone know the spec authors reasoning behind not making this possible without javascript? Isn't it considered bad form to use anything other than CSS to format the output? It seems to me to a big a hole in the spec. ______________________________________________________________________ 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/