Using the gallerystyle.css file, you may set the width for the #motioncontainer selector to a percentage. As long as the gallery doesn't have a fixed width parent, that will take care of varying screen widths.
Then, if you set the #motiongallery selector as well as the images within the gallery to 100% height:
Code:
#motiongallery, #motioncontainer img {
height: 100%;
}
and specify no width for them, the browser will scale the images to the proper width and height to fit within the motioncontainer.
Then it gets a little complicated. We need to set the height of the motioncontainer as the page is loading, so that it will be the desired height before the gallery begins to make it's calculations as to how it will lay out. In order for that to work, it would be best to remove (highlighted) from the gallerystyle.css file:
Code:
#motioncontainer {
/*margin:0 auto; Uncomment this line if you wish to center the gallery on page */
width: 50%; /* Set to gallery width, in px or percentage */
height: 130px; /* Set to gallery height */
}
I have no specific idea how (the exact ratio) you want page height to influence image height. But it would be done here in the file (additions highlighted):
Code:
function fillup(){
if (iedom){
var h = (window.innerHeight || ietruebody().clientHeight) / ??;
crossmain=document.getElementById? document.getElementById("motioncontainer") : document.all.motioncontainer;
crossmain.style.height = h + 'px';
if(typeof crossmain.style.maxWidth!=='undefined')
crossmain.style.maxWidth=maxwidth+'px';
menuwidth=crossmain.offsetWidth;
cross_scroll=document.getElementById? document.getElementById("motiongallery") : document.all.motiongallery;
actualwidth=document.getElementById? document.getElementById("trueContainer").offsetWidth : document.all['trueContainer'].offsetWidth;
if (startpos)
cross_scroll.style.left=(menuwidth-actualwidth)/startpos+'px';
crossmain.onmousemove=function(e){
motionengine(e);
}
crossmain.onmouseout=function(e){
stopmotion(e);
showhidediv("hidden");
}
}
loadedyes=1
if (endofgallerymsg!=""){
creatediv();
positiondiv();
}
if (document.body.filters)
onresize()
}
and here:
Code:
onresize=function(){
var h = (window.innerHeight || ietruebody().clientHeight) / ?? ;
crossmain.style.height = h + 'px';
actualwidth=document.getElementById? document.getElementById("trueContainer").offsetWidth : document.all['trueContainer'].offsetWidth;
if (typeof motioncontainer!=='undefined'&&motioncontainer.filters){
motioncontainer.style.width="0";
motioncontainer.style.width="";
motioncontainer.style.width=Math.min(motioncontainer.offsetWidth, maxwidth)+'px';
}
menuwidth=crossmain.offsetWidth;
cross_scroll.style.left=startpos? (menuwidth-actualwidth)/startpos+'px' : 0;
}
Notice the two sets of red ??'s. These should each be replaced with a number. Use the same number for both sets. This number will be the fraction of the window height that you want the images' height to be. Minimum and/or maximum numbers could be established if required.
However, there is a possibility that this second bit (the onresize function) could cause an endless loop with the change in height of the gallery triggering another onresize event that changes the gallery height again, etc., etc. If that happens, revert the onresize function to its original state, and be aware that then if the user changes their screen height after loading the page, the images will not resize with it. But there is a good chance that will not be a problem, so give it a shot.
Bookmarks