添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I am using a script for resizing an iframe to fit its content (only the height), but recently when I made some changes to a content page so it gets taller, it refuses to resize that iframe to the right height. Instead it resizes the iframe to about 20 pixels too short. I have no idea why it does that. I have tried in Chrome and IE and there it still works. I have one clue on what it can be: There are like 10 lines of text on that content page, each with <p> tags. It seems that firefox fetches the length of the document, if you measure from the top to the bottom. BUT when it renders the content it renders a padding at the top and the bottom that's about 20px total. It feels like it forgets to take into account that padding when retrieving the height. Am I right? If so, how to solve it?I've tried in both FF Aurora and ordinary FF. EDIT: Oh ######, realized I posted this in the wrong forum, please move to javascript! :facepalm: Also, just to add to the pile of working browsers, even Dreamweaver renders it right!

What are you using to retrieve height? offsetHeight or scrollHeight, or you could just add 50 to returned height for content height.
The scrollheight (as can be seen in the topic title ;) ), I tried with offsetheight but it said exactly the same value. Well yeah I could probably solve it that way, but it feels like stitching two wooden planks together instead of using one that is the wanted length :) I would have solved it that way if all browser would have been wrong, but since Chrome renders it perfectly, and IE renders it OK I want to know if there are another solution or if this is a bug in Firefox.