• 0

Getting an Iframe height to work in firefox


Question

Hi there

Ive got a hosted esupport solution and having a problem integrating this with my site. Its hosted on a different server to that of my main siteThe problem is

that im after http://specialtech.corphelp.net/index.php to show on my site to look like its under the umbrella of my site. I.e not to spawn another page thats seperate to the site.

So im trying to use an IFRAME to make it look like its part of my site.

<P ALIGN=center>

<IFRAME SRC="http://specialtech.corphelp.net/index.php" width=100% height="100%">Your browser does not support iFrames.</IFRAME>

The width section works but not the height. Any ideas or better ways?

13 answers to this question

Recommended Posts

  • 0

&lt;html&gt;
&lt;body&gt;
&lt;IFRAME SRC="http://specialtech.corphelp.net/index.php" style="border: #000000 2px dotted; width: 100%; height: 100%"&gt;Your browser does not support iFrames.&lt;/IFRAME&gt;
&lt;/body&gt;
&lt;/html&gt;

see the image of my FF with 100%x100% iframe

post-96781-1111754254_thumb.jpg

  • 0

IFRAME is part of the standard.

http://www.w3.org/TR/html401/present/frames.html#edef-IFRAME

Therefore, all standards-compliant browsers (mozilla, ie, opera, etc) support it.

Did you try zeroing out the padding (or margins) from your body (or container object)?

CSS file
body
{
    padding: 0;
}

OR

Inline CSS
&lt;body style="padding: 0"&gt;
&lt;iframe etc....&gt;blah&lt;/iframe&gt;
&lt;/body&gt;

  • 0

Thanks for all the replies.

cant use CSS because the site that will have the code to it basically embeds the HTML. I.e the I can only use content that would go between the body tags.

You might be able to suggest something better.

I want to replace this content

http://specialtech.co.uk/spshop/customer/h...tus&mode=update

with the livehelp system. Now the problem I have is that the site is hosted and they wont let me have the esupport thing on the same server, hence the hosted option.

Is there a better solution that anyone can kindly help with.

Thanks

  • 0

Hi everyone,

I seem to have had exactly the same problem - despite the definitions which were already linked above, mozilla-based browsers like firefox or netscape don't seem to understand percentage lenghts provided in the <iframe> tag.

&lt;iframe src="aktuell_parent.htm" width="900", height="100%" frameborder=0&gt;&lt;/iframe&gt;

- all this was put in a table in order to keep the iframe content centered at all browser window widths.

But I found a solution for my case - maybe it could help. Instead of using the table for centering, I changed the code as follows:

&lt;div align="center"&gt;
&lt;iframe src="aktuell_parent.htm" width="900" height="100%" align="top" scrolling="auto" frameborder=0 style="border: 0px"",&gt;&lt;/iframe&gt;
&lt;/div&gt;

style="border: 0px" was needed also because of netscape as it did not understand frameborder=0...

You can see that now I use the <div> tag and align variable instead of the table.

I hope this was helpful... I've been thinking how to solve this problem for 3 days now and I couldn't find anything helpful on google... so maybe the next one will have more luck if I post this here...

  • 0

I've done some hunting around, and just tested the following on the latest versions of Opera, Firefox, and Netscape Navigator. I also tested it on Internet Explorer 6, but not 7.

The following seems to be the only way to get height percentage of iframes to work across all browsers.

Add the following to the style for the page. (If you don't know how to do that, click here.)

html,body { width:100%; height:100%; padding:0px; margin:0px; }

This allows your iframe percentages to work correctly across all the browsers I mentioned above. Of course, you can have different padding and margin options, or even omit them, but you should definitely include the height part. (It's a good idea to keep the width part, as well.) Another note: If you don't add the style for both the html and body items, it will only work on some of the above browsers (Firefox is not one of them).

Hope that helps!

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.