Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

resize table with iframe in it

Posted on 2004-05-02
5
Medium Priority
?
342 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 2000 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

[Webinar] Cloud Security

In this webinar you will learn:

-Why existing firewall and DMZ architectures are not suited for securing cloud applications
-How to make your enterprise “Cloud Ready”, and fix your aging DMZ architecture
-How to transform your enterprise and become a Cloud Enabler

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

886 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