From: stronk7 Date: Sun, 23 Apr 2006 09:59:04 +0000 (+0000) Subject: Now the resize script hasn't anymore harcoded widths. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=3f5e294b976f8154fc32b8b867d2aca217b6a075;p=moodle.git Now the resize script hasn't anymore harcoded widths. --- diff --git a/mod/resource/type/ims/resize.js b/mod/resource/type/ims/resize.js index c181eda81f..fab3f956ff 100644 --- a/mod/resource/type/ims/resize.js +++ b/mod/resource/type/ims/resize.js @@ -65,7 +65,8 @@ function resizeiframe (hasNav) { bottomMargin; if (hasNav == true) { - var iframeWidth = (winWidth - 325)+'px'; + var navBarWidth = document.getElementById('ims-menudiv').offsetWidth; + var iframeWidth = (winWidth - navBarWidth - 25)+'px'; document.getElementById('ims-menudiv').style.height = (winHeight - totalHeight)+'px'; } else { @@ -75,4 +76,4 @@ function resizeiframe (hasNav) { document.getElementById('ims-contentframe').style.height = (winHeight - totalHeight)+'px'; document.getElementById('ims-containerdiv').style.height = (winHeight - totalHeight)+'px'; document.getElementById('ims-contentframe').style.width = iframeWidth; -} \ No newline at end of file +}