• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

  • 0
Sign in to follow this  

Getting an Iframe height to work in firefox

Question

shifts    13

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?

Share this post


Link to post
Share on other sites

13 answers to this question

Recommended Posts

  • 0
soil    1

maybe try:

&lt;P ALIGN=center&gt;
&lt;IFRAME SRC="http://specialtech.corphelp.net/index.php" width=100% height="600"&gt;Your browser does not support iFrames.&lt;/IFRAME&gt;

or what ever height fits in :unsure:

Share this post


Link to post
Share on other sites
  • 0
dmkov.ru    0
&lt;IFRAME SRC="la-la-la.html" style="width: 100%; height: 100%"&gt;

Share this post


Link to post
Share on other sites
  • 0
shifts    13
<IFRAME SRC="la-la-la.html" style="width: 100%; height: 100%">

Tried that in FF and still had the same result.

Only problem that i just thought of using iframes is that there would be a 2nd scroller

Share this post


Link to post
Share on other sites
  • 0
dmkov.ru    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

Share this post


Link to post
Share on other sites
  • 0
Lee G.    234

I'm not sure, but I think IE is the only browser that completely supports IFrame.

I definately know Netscape doesn't

Share this post


Link to post
Share on other sites
  • 0
soil    1

maybe use css 2 make it 100% would that work? :rolleyes: (just an idea)

Share this post


Link to post
Share on other sites
  • 0
Oogle    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;

Share this post


Link to post
Share on other sites
  • 0
+M2Ys4U    97

firefox does support iFrames...

Share this post


Link to post
Share on other sites
  • 0
Lee G.    234

^ I wasn't sure.

I didn't know, appologies :)

Share this post


Link to post
Share on other sites
  • 0
shifts    13

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

Share this post


Link to post
Share on other sites
  • 0
h4ndsp1k3n    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...

Share this post


Link to post
Share on other sites
  • 0
ElectroFox    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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.