Thanks for your input. It got me on the right track. Well, I didn't get the exact same thing running, but I did do something similar:
Code:
<script type="text/javascript">
var winSize = null;
window.onresize = windowResize;
window.onload = windowResize;
function windowResize() {
var changebar = document.getElementById('imageBar');
var changediv = document.getElementById('imageDiv');
var changeframe = document.getElementById('imageFrame');
winSize = {
x: ( document.body.clientWidth ) ? document.body.clientWidth : window.innerWidth,
y: ( document.body.clientHeight ) ? document.body.clientHeight : window.innerHeight
}
winSize.h = Math.ceil((winSize.y-80)*.9);
winSize.w = Math.ceil(winSize.x*.8)-100;
winSize.t = 90 + Math.ceil((winSize.y-90)/40);
winSize.l = Math.ceil(winSize.x*.1)+100;
changebar.style.height = winSize.h;
changediv.style.width = winSize.w;
changediv.style.height = winSize.h;
changediv.style.top = winSize.t;
changediv.style.left = winSize.l+'px';
changeframe.style.width = winSize.w;
changeframe.style.height = winSize.h;
changeframe.style.top = winSize.t;
}
</script>
And I just change the properties of the lines in the page, which are:
Code:
<div class="imageBar" name="imageBar" id="imageBar" style="float:left; overflow:auto; height:510px; width:90px; left:10%; top:120px">
and
Code:
<div class="imageDiv" name="imageDiv" id="imageDiv" style="position: fixed; width:790px; height:510px; left:20%; top:120px;">
<iframe class="imageFrame" name="imageFrame" id="imageFrame" src="http://earth.engr.ccny.cuny.edu/noaa/wc/DailyGraphs/CurrentWeather000.jpg" style="width:790px; height:510px; border:none;" >
</iframe>
</div>
So, it works pretty good in FF, but in IE looks like I have to allow for a smaller iframe in the div (?), but in Opera, things are bizarre! To get this running, looks like I need to detect browser type and do something different for each. What is the best method? Am I missing something on the way div works in IE? The test URL is: http://earth.engr.ccny.cuny.edu/noaa...DirSelect4.php , and the unmodified version is at:http://earth.engr.ccny.cuny.edu/noaa...ends/index.phpCould you suggest what to do? The goal is to get the page to look right in all browser resolutions. Once I get this working right, I'll go on to use these methods elsewhere.....
Bookmarks