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'>";
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'>";
Last edited by keyboard; 08-13-2012 at 02:27 AM.
KennyP (08-13-2012)
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" );
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
KennyP (08-13-2012)
Thanks very much Bernie, but unfortunately again it is having no affect in IE.
Is there anything else that can be tried?
Thanks again
Last edited by KennyP; 08-13-2012 at 04:15 AM.
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; }
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
KennyP (08-13-2012)
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'>";
KennyP (08-13-2012)
That is in fact, the CSS I posted, and I somehow doubt the result will change
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
KennyP (08-13-2012)
I know (it's not exactly the same)... I just wanted to check something... (Please still try it)
KennyP (08-13-2012)
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.
"Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
Anime Views Forums
Bernie
KennyP (08-13-2012)
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?
Bookmarks