Solved

resize table with iframe in it

Posted on 2004-05-02
5
333 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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

821 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