forked from I2P_Developers/i2p.i2p
Used JS changes to fix iframed i2ptunnel scrollbar issue in CSS
Also added comments to the JS to point out that the issue is that offsetHeight doesn't include the very top or bottom margins.
This commit is contained in:
@@ -28,6 +28,10 @@
|
||||
doc.getElementsByClassName('panel')[0].className += ' iframed';
|
||||
}
|
||||
function resizeFrame(f) {
|
||||
// offsetHeight returns the height of the visible area for an object, in pixels.
|
||||
// The value contains the height with the padding, scrollBar, and the border,
|
||||
// but does not include the margin. Therefore, any content within the iframe
|
||||
// should have no margins at the very top or very bottom to avoid a scrollbar.
|
||||
var doc = 'contentDocument' in f? f.contentDocument : f.contentWindow.document;
|
||||
f.style.height = doc.body.offsetHeight + "px";
|
||||
}
|
||||
|
||||
@@ -27,6 +27,10 @@
|
||||
doc.body.className += ' iframed';
|
||||
}
|
||||
function resizeFrame(f) {
|
||||
// offsetHeight returns the height of the visible area for an object, in pixels.
|
||||
// The value contains the height with the padding, scrollBar, and the border,
|
||||
// but does not include the margin. Therefore, any content within the iframe
|
||||
// should have no margins at the very top or very bottom to avoid a scrollbar.
|
||||
var doc = 'contentDocument' in f? f.contentDocument : f.contentWindow.document;
|
||||
f.style.height = doc.body.offsetHeight + "px";
|
||||
}
|
||||
|
||||
@@ -1321,3 +1321,7 @@ div.applabel {
|
||||
}
|
||||
|
||||
/* end home page */
|
||||
|
||||
iframe.iframed {
|
||||
margin: 15px 0 0;
|
||||
}
|
||||
|
||||
@@ -225,6 +225,10 @@ hr {
|
||||
margin: 16px auto -8px auto !important;
|
||||
}
|
||||
|
||||
.iframed .panel.iframed {
|
||||
margin: 0 auto -8px auto !important;
|
||||
}
|
||||
|
||||
.panel td:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user