I have been having a really hard time finding anyone to help me out with this.
[url]http://mambo-templates.ty2u.com
[code]
function limit(a,b,c){
document.mmlimit=a;
document.minw=b;
document.maxw=c;
if(document.getElementById&&navigator.appVersion.indexOf(“MSIE”)>-1&&!window.opera){
if(window.attachEvent){
window.attachEvent(“onresize”,setWidth);
window.attachEvent(“onload”,setWidth);
}else{
window.onload=setWidth;
window.onresize=setWidth;
}
}
}
function setWidth(){
var curw=null,minwidth=null,maxwidth=null,theDiv=document.mmlimit;
var resizeObj=document.getElementById(theDiv);
minwidth=parseInt(document.minw, 10);
maxwidth=parseInt(document.maxw, 10);
if(resizeObj&&document.body&&document.body.clientWidth){
curw=parseInt(document.body.clientWidth, 10);
if(curw<minwidth){
resizeObj.style.width=minwidth+”px”;
}
else if(curw>maxwidth){
resizeObj.style.width=maxwidth+”px”;
}
if(curw<maxwidth){
if(curw>minwidth){
resizeObj.style.width=curw+”px”;
}
}
}
}
limit(‘outer’,775,999);
In Firefox it has min-width and max-width but in IE I am using javascript and it wont work for both min and max at the same time.
Currently it can start small and go big but then it wont go small again unless the reload button is pressed and that is the problem. It has to resize both ways.
Thanks for taking a look!
Ryan