Doctype在mozilla中破坏了我的iframe [英] Doctype is breaking my iframe in mozilla

查看:66
本文介绍了Doctype在mozilla中破坏了我的iframe的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个问题,我用谷歌搜索了几个小时,无法找到答案,所以我在这里求助,因为我在这里发现了类似的问题。


我有一个我使用的页面,它上面有一个iframe,但它不是常规的iframe,iframe有一个调整大小的脚本,可以将iframe的高度调整为高度正在浏览的页面。使用这个脚本它消除了滚动!


这一切都很好但后来我意识到它在IE中正常运行我需要添加一个doctype,当我添加一个doctype它在IE中正常运行但它在Firefox中不起作用。在firefox框架没有调整大小,它就像是50px的高度。

我尝试了一堆不同的doctypes而且他们都不工作。


这个问题页面(带有doctype - 仅在IE上正常工作):
http ://ww-chat.com/games.php


这是没有doctype的页面(仅适用于FIREFOX - 不适用于IE):
http://ww-chat.com/games-nodoctype.php


这是我用于iframe的代码:


< iframe id =" games"名称= QUOT;游戏" SRC =" HTTP://ww-chat.com/games/" frameborder = 0 scrolling = no width =" 990" onload =" if(window.parent&& window.parent.autoIframe){window.parent.autoIframe(''games'');}">< / iframe>


这是用于调整框架大小的脚本:
http://ww-chat.com/iframeresize.js


我的网站上还有其他iframe使用调整大小脚本,它们工作得很好(使用doctype!)。


谢谢,

Worldwideebm

This is a problem that i have googled for hours and can''t find an answer so i resort to asking on here because i found similar question on here.

I have a page i use, It has an iframe on it but it is not regular iframe, The iframe has a resizing script that resizes the height of the iframe to the height of the page being viewed. Using this script it eliminates scrolling!

This has all been working out great but then i realise for it to function properly in IE i need to add a doctype, When i add a doctype to it it functions properly in IE but it doesn''t work in firefox. In firefox the frame doesnt resize and it is like 50px height.
I have tried a bunch of different doctypes and they don''t work.

This is the problem page (with doctype - works properly only on IE):
http://ww-chat.com/games.php

This is the page without a doctype (Works properly only on FIREFOX - not IE):
http://ww-chat.com/games-nodoctype.php


This is the code that i use for the iframe:

<iframe id="games" name="games" src="http://ww-chat.com/games/" frameborder=0 scrolling=no width="990" onload="if (window.parent && window.parent.autoIframe) {window.parent.autoIframe(''games'');}"></iframe>


This is the script that it uses to resize the frame:
http://ww-chat.com/iframeresize.js


I have other iframes on my website which don''t use the resize script and they work perfectly fine (with doctype!).

Thanks,
Worldwideebm

推荐答案

任何人都可以帮我解决这个问题吗?
Can anyone help me on this problem?


你应该看看摆脱这些错误


无论如何,问题似乎是因为你在设置高度时忘记了单位。添加px到了高度设置。
You should look at getting rid of these errors.

Anyhow, the problem seems to be because you''ve forgotten the units when setting the height. Add "px" to the height setting.


嘿,我不是很擅长这个但是我应该把px放在哪里?


我试过了将它放在990(宽度)之后,我尝试在10之后放置px(在脚本中)并且没有修复它。


任何想法?

顺便说一下调整大小的脚本不是我的..
Hey, I''m not very good at this but where exactly should I put px?

I have tried placing it after 990 (the width) and i have tried placing px after 10 (in the script) and neither of those fixed it.

Any ideas?

Btw the resize script isn''t mine..


这篇关于Doctype在mozilla中破坏了我的iframe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆