Have a look at this page... might be what you're looking for.
First, try this... :\
PHP Code:$ImageDisplay = "<img src='$FileLocation' alt='' style="max-width:240px;max-height:320px;overflow:auto;" border='0' align='middle'>";
Printable View
Have a look at this page... might be what you're looking for.
First, try this... :\
PHP Code:$ImageDisplay = "<img src='$FileLocation' alt='' style="max-width:240px;max-height:320px;overflow:auto;" border='0' align='middle'>";
Thanks keyboard. That code also works well in FF (as the previous code without overflow:auto;), but in IE the actual size of the image, 640X960, is still displaying and breaking up the page.
The problem is that the max-width and height properties are not supported in Internet explorer, you can get around It as such:
Code:width:expression(document.body.clientWidth > 240? "240px": "auto" );
height:expression(document.body.clientHeight > 320? '320px": "auto" );
Thanks very much Bernie, but unfortunately again it is having no affect in IE.
Is there anything else that can be tried?
Thanks again
You couldtrysomeplain JavaScript
Remember to change the id's in the codeCode:var imageWidth = document.getElementById('yourimageid');
var imageHeight = document.getElementById('yourimageid');
if(imageWidth.width < 240 && imageHeight.height < 320){
var inside = true;
}
else{
var inside = false;
}
if(inside = false){
imageWidth.width = 240 ;
imageHeight.heght = 320;
}
KennyP, give this a go....
PHP Code:$ImageDisplay = "<img src='$FileLocation' alt='' style="width:expression( document.body.clientWidth > 239 ? "240px" : "auto" );max-width:240px;height: expression( this.scrollHeight > 319 ? "320px" : "auto" );max-height:320px;" border='0' align='middle'>";
That is in fact, the CSS I posted, and I somehow doubt the result will change
I know (it's not exactly the same)... I just wanted to check something... (Please still try it)
The only real difference in my view that will have occurred is that he may be putting the CSS rules in the correct place, as he may not have before.
Thanks very much guys or continuing to find a fix. The previous code did work in FF, but these last fixes don't work in either browser. I also upgraded from IE8 to IE9; again no difference.
After all the years of developing IE, why can't they get it right?