Closed
Bug 131684
Opened 24 years ago
Closed 24 years ago
iframes doesnt respect the window size
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: thiago, Assigned: john)
Details
Attachments
(3 files)
If i create an iframe, it gets bigger than the window size, so the scrollbar
appears. If i dynamically resize it, it doesnt respect the resize as well.
I have an iframe that splits the page in 2. The first one is the top one and it
has 32 pixels, then there is the content one which has the 100% of the page
minus 32 pixels. It works fine on I.E and if i subtract 64 from the 100% of the
main iframe, the scrollbar doesnt appear, but instead i have a blank space on
the bottom of the page.
Comment 1•24 years ago
|
||
Reporter, could you attach a testcase, or give an url to one?
| Reporter | ||
Comment 2•24 years ago
|
||
http://webfx.eae.net/dhtml/dhtmlmenu3/plain.html
2 scrollbars appear there and it should be just one.
The menu is not DOM, so i dont expect it to work. The problem is just the
iframe.
Comment 3•24 years ago
|
||
Here is the source of the testcase.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Plain DHTML Menu with frame</title>
<style type="text/css">
<!--
body {margin: 0px; border: 0px;}
#contentDiv {width: 100%; height: 100%;}
#contentFrame {width: 100%; height: 100%;}
-->
</style>
</head>
<body scroll="no" onselectstart="return false">
<div id="contentDiv">
<iframe src="default.html" id="contentFrame"></iframe>
</div>
</body>
</html>
Comment 4•24 years ago
|
||
Comment 5•24 years ago
|
||
In the above testcase two scrollbars appears but only one scrollbar should
appear. May be the ID attribute of the content frame is causing the problem.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 6•24 years ago
|
||
Comment 7•24 years ago
|
||
Alright, what I see here:
1) Error in javascript on page; the onresize function fixSize() refers to
undefined "contentDiv" and "menuBar". contentDiv.style.height, but
contentDiv is not defined anywhere. Fixing the references to
document.getElementById("contentDiv") and document.getElementById("menuBar")
respectively, fixes the problem.
2) The onresize function fixSize() changes the height wrong, as it (after
fixing problem 1) adjusts the height of the contentDiv to (height of the
document body - height of menuBar). But the body is obviously taller than
the viewport since the contentDiv alone is 100% of the height. Thus after
fixing problem 1 the layout just shrinks on every resize. Use
window.innerHeight instead.
3) The iframes have borders by default; if you adjust content to 100% of the
viewport, you need to remove the iframe borders in css to make everything
fit.
4) the other testcases have plenty of default margins and borders in addition
to the 100% size of the content. Setting margins, paddings, borders to 0 or
none or whatever is appropriate fixes them.
i.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
Updated•7 years ago
|
Product: Core → Core Graveyard
Updated•7 years ago
|
Component: Layout: HTML Frames → Layout: Images
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•