By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,568 Members | 1,196 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,568 IT Pros & Developers. It's quick & easy.

iframe 100% height trickeration

P: n/a
Hi,
I am trying to get my iframe to occupy the entire height of the
table cell in which it is located. Sadly, this table cell may have
variable height. This is the code I'm using right now that doesn't
work on any browser ...

<tr>

<td><iframe style="background-color:#ffffff; border-style:none;
border-width:0px;" width="100%" height="300" src="features.php"
scrolling="auto"></iframe></td>
</tr>

Is there any JS trickery I can do to deduce the height fo that table
cell and then document.write the height attribute of the iframe? Even
if it only works on one browser, it would be better than nothing, which
is what I have now.

THanks, - Dave

Oct 6 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a

la***********@zipmail.com wrote:
Hi,
I am trying to get my iframe to occupy the entire height of the
table cell in which it is located. Sadly, this table cell may have
variable height. This is the code I'm using right now that doesn't
work on any browser ...

<tr>

<td><iframe style="background-color:#ffffff; border-style:none;
border-width:0px;" width="100%" height="300" src="features.php"
scrolling="auto"></iframe></td>
</tr>
Just a thought and you don't indicate, but have you tried setting the
height of the iframe to 100%?
Is there any JS trickery I can do to deduce the height fo that table
cell and then document.write the height attribute of the iframe? Even
if it only works on one browser, it would be better than nothing, which
is what I have now.

THanks, - Dave


Oct 6 '05 #2

P: n/a
Yes. I've yet to find a browser on which that works. -

Oct 6 '05 #3

P: n/a

la***********@zipmail.com wrote:
Yes. I've yet to find a browser on which that works. -


I've tried the following on IE6 and it works for me:

<table>
<tr>
<td>
<iframe src = "path/page" style = "width: 100%; height: 100%"></iframe>
</td>
</tr>
</table>

Oct 7 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.