Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Using IFrames

Mar 3, 2004 9:00AM PST

OK, I use IFrames to embed a contact page for example, so if theys end something the "Thank You" page will load in the IFrame rather then loading the a whole new page. It makes it faster for modems. Now I got this complain that on a higher screen solution the "send" and "reset" button are cut off. I could extend the IFrame a little more but is there a way I can tell the IFrame to use as much space to show everything? Is there maybe another way I can get the same effect that a new site loads on a site rather then loading an entire new site?

Discussion is locked

- Collapse -
Re:Using IFrames
Mar 3, 2004 11:05AM PST

You may use width and height on Iframes. Also, why don?t u add the scrolling="auto" tag, just if the page doesn?t fit?

Make it something like this

< iframe src = "xxx . html " width = "xxx" height= "xxx" scrolling = "auto" >

Also consider using marginwidth="0" and marginheight="0" to have a better control. (Set no margins)

Hope this helps.

- Collapse -
Iframes auto resize??
Mar 1, 2005 3:13AM PST

I am wonder if there is a way to have the Iframes auto resize to which ever html I insert. For example I am linking to different excel converted htm files. They all have diffrent number of rows and columns and I want the Iframe to auto resize to a certian extent.
Thanks

- Collapse -
that was my problem
Mar 10, 2005 3:36AM PST

i wanted my iframe to do that too, but it never worked- so i got away from iframes and hardly ever use them anymore. there are better things than iframes... include files.

Regards,
Ryan Sechrest

[email this member]
---------------------------------------------------------------------->
"Any technology significantly advanced enough
is indistinguishable from magic." Arthur C. Clark
<---------------------------------------------------------------------

- Collapse -
RE: iFrame Size's
Aug 26, 2005 1:30AM PDT

I have often found it useful to use percentages for the size aspects of iFrames, this way the iFrame will always fill a certain amount of the webpage on different screen resolutions.

For example;
<body>

<iframe src="contact.htm" width="25%" marginwidth="0" height="25%" marginheight="0" align="middle" scrolling="auto"></iframe>

</body>

Notice that I have given units to the width and height values instead of just a value, give this a go, it can sometimes take a few adjustments of the values before you get the result you require.

You can also use percentages on table sizes, this is another good way of ensuring that your webpage looks how you want it to on different screen resolutions.

I hope this helps and feel free to email me if require any further advice.