At 08:32 +0000 on 03/23/2012, Luis Cabral wrote about [css-d] How to make a div fill the height of an iframe:

Hello,
I have the following scenario:
- An iframe that has fixed width and height and is absolutely positioned in the middle of the screen (simulating a modal pop up window)- The document inside that iframe contains 2 divs, both 100% width. The top one is variable height, and the bottom one should occupy the space left inside the iframe. If required, scrollbars should display in the bottom div, but not in the iframe itself.
I made a diagram to try to make it clearer:
+-iframe (fixed width and height)|+-div1----||variable height|||||+-----------|+-div2----||height should occupy the ||remaining space in the div, scrollbars show ||inside the div if required if its contents ||are bigger than the available space|+----------+---------- Note that this slightly different from the usual requirement, which is to dynamically resize the iframe accordingly to its contents. Is this possible to be done with just CSS? (assume the most recent browsers will be used i.e. Chrome, IE8+ etc)
ThanksLuis
                                         
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

If you make the 2nd DIV a table would that work (ie: Show the scroll bars as needed but not affect the height of the iframe or add scroll bars to it)?
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to