Solved

resize table with iframe in it

Posted on 2004-05-02
5
332 Views
Last Modified: 2010-04-09
Here is the code

<table>
     <tr>
          <td width="100%" colspan="2">Some Header</td>
     </tr>
     <tr>
          <td width="20%">Menu</td>
          <td width="80%"><iframe style="width: 90%; height: 100%; scrolling: no;" src="some.htm">you dont support this go away</iframe></td>
     </tr>
</table>

Here is what I need.  I need the iframe to resize in height with the page being loaded.  I do not want to have any verticle or horizontal scroll bars.  I can control the width, but some pages are longer and so the height needs to dynamically change.

Thanks!

0
Comment
Question by:groone
  • 2
5 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 10971759
set it dynamically off the load like this:

<body onload="top.frames[0].rezizeTo(top.frames[0].document.body.scrollWidth,top.frames[0].document.body.scrollHeight)">

That assumes that you are not in a frame set and this is the only iframe.  if there are other frames or iframes change give the iframe a name and change frames[0] to frames['thenamegoeshere']


Cd&
0
 
LVL 10

Expert Comment

by:eeBlueShadow
ID: 10971973
and here was me about to point him to http:/Web_Languages/Q_20974540.html

_Blue
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 10972178
_Blue,

That one is for when you put it on the pages being loaded in.  This is the one for coming in from the outside.

Cd&
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now