Forum Moderators: open

Message Too Old, No Replies

Safari: IFRAME nested in table

IFRAME doesn't register as dimensioned content in table cell

         

jstakel

11:14 pm on Dec 8, 2004 (gmt 0)



Debugging a page at:

<Sorry, no personal URLs. See TOS [webmasterworld.com]>

If you view this page in Safari, you'll notice the lower right quadrant is a big red, blank square. However, there's an IFRAME element there, as the sole bit of content within a table cell, that isn't showing. It's width and height are both set to 100%.

Some debugging has led me to believe that Safari considers the dimensions of the IFRAME element to be 0, when width and height are set to percentages. If I change the width and height to pixel dimensions, then the IFRAME shows, at those dimensions, and the background of the table cell shows as planned. If I add other content to the table cell which contains the relatively-dimensioned IFRAME, then that content shows up and the table cell expands just enough to contain this content.

Anyone know how to format an IFRAME (with CSS and/or HTML) and a containing table so that it is dimensioned to the mx of the containing block? I figure I can do it with javascript but I'd rather use that as a last resort.

Thanks!

Best,
John

[edited by: tedster at 1:10 am (utc) on Dec. 9, 2004]

mrnoisy

12:50 am on Dec 9, 2004 (gmt 0)

10+ Year Member



Instead of an iframe, perhaps you could use a div with overflow set to auto:

css


#box {
overflow:auto;
width:100%;
height:100%;
}

html

<div id="box">
Content Here...
</div>

AWildman

5:17 pm on Dec 10, 2004 (gmt 0)

10+ Year Member



You'll also notice that version 6.2 of NN doesn't allow percentages for the height and width of iframes. I've had to do js to resize iframes in order to get them to show properly cross browser and os