Aries7
January 29th, 2007, 09:00 PM
I posted this on another forum a while back...and they were unable to help, so i thought i would try it here...
I am working on a site here, and have encountered the following issue.
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25%"><img width="100%" src="XXXX"/></td>
<td width="25%"><img width="100%" src="XXXX"/></td>
<td width="25%"><img width="100%" src="XXXX"/></td>
<td width="25%"><img width="100%" src="XXXX"/></td>
</tr>
</table>
On Firefox the images resize themselves to fit in the page wide table, and will dynamically resize as the window is resized. On IE though the images appear actual size and do not resize unless the window gets bigger than their actual size. Does anyone know what the problem is, and how to fix it?
I've never noticed this before.
See http://www.wickham43.supanet.com/fo...idths-test.html
where I've put three versions up online.
The only one that keeps Firefox showing full width and full height is
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td width="25%"><img src="raindroplets.jpg"/></td>
<td width="25%"><img src="raindroplets.jpg"/></td>
<td width="25%"><img src="raindroplets.jpg"/></td>
<td width="25%"><img src="raindroplets.jpg"/></td>
</tr>
</table>
http://masteraries7.brinkster.net/index.html
that is the URL of my current test version.
Firefox is resizeing them like i want it too, but IE doesnt seem to want to make them smaller than their actual size unless i say i want them Xpx wide or high.
I just realised it wasn't Firefox you were concerned about, but you want IE to resize them.
Since images have a fixed size IE will always display that size unless you code another fixed width, and it adjusts height to suit, as you say.
I've never heard that IE can adjust flexibly to screen size. Maybe javascript can do it. It just shows how much better Firefox is.
LOL, was hoping i wouldnt have to resort to JS, but I may have to. Thanks for the input, i will wait around and see if there are any other ideas before i jump off that cliff.
I've just found this re IE dynamic image resizing:-
http://www.siteexperts.com/tips/elements/ts21/page1.asp
It's obviously very old, referring to IE4 and Netscape but the zoom principle might still work.
That just might work, with some tweaking...thanks, this will be a great help.
This is probably the ultimate solution:-
http://www.webreference.com/program...ages/index.html
http://www.webreference.com/program...t/images/2.html
I haven't tried it.
Alright i THINK i have it working. But i am using IE7 Beta 2 on my laptop to rest it. It doesnt appear to be working on IE6. But i am not sure how it is set up on the computer i am sitting at.
So could someone please go to...
http://masteraries7.brinkster.net/index.html
and tell me if the images are resizing on their IE? And if not does anyone have any idea why it would work on IE7 but not IE6?
EDIT: I was thinking that perhaps Brinkster doesnt allow external .js files, but i tried it offline off my USB, and still nothing. perhaps i am just handling something not quite right, lol.
IE6 still full size images; Firefox still resizing smaller.
hmmm, that is what i was afraid of.
I wonder why it works on IE7, but not IE6...
Here is the entirety of my script...
// JavaScript Document
// resizeHeaderImages makes calls to the sizeTo() function
function resizeHeaderImages(){
if(navigator.userAgent.indexOf('MSIE') != -1){
var width = document.body.clientWidth / 4;
var percentage = width/640;
var height = 480 * percentage;
document.image1.width = width;
document.image1.height = height;
document.image2.width = width;
document.image2.height = height;
document.image3.width = width;
document.image3.height = height;
document.image4.width = width;
document.image4.height = height;
}
}
I think that even when IE resizes the image, it will only resize the width causing the image to distort. You could use a script to sniff the screen resolution and serve the apropriate sized images but of course screen resolution isn't browser size so you will have to hope they don't have to many panels and toolbars open and that the browser is maximised. In reality, you're probably going to have to accept that sometime the images will be cropped slightly to fit the page.
well at the moment i have the script finding the browser size, and resizing them in proportion to that. But for some reason IE isnt resizing them at all. And i am just not sure why, lol.
Browser sizes does not exist in some versions. Only screen resolution. When you change the size of the browser window, the screen resolution stays the same. Try actually changing your display settings and see how it performs.
I hear what you are saying. But on IE6 it isnt reaizing at all, it is displaying the images at their true size, 640x480. I have this monitor set to 1152x864, and the images still come through as a line of 4 640x480 images. I made my screen res, higher and smaller, they remained 640x480.
Any other ideas?
And that was all i heard from them...any ideas here?
I am working on a site here, and have encountered the following issue.
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25%"><img width="100%" src="XXXX"/></td>
<td width="25%"><img width="100%" src="XXXX"/></td>
<td width="25%"><img width="100%" src="XXXX"/></td>
<td width="25%"><img width="100%" src="XXXX"/></td>
</tr>
</table>
On Firefox the images resize themselves to fit in the page wide table, and will dynamically resize as the window is resized. On IE though the images appear actual size and do not resize unless the window gets bigger than their actual size. Does anyone know what the problem is, and how to fix it?
I've never noticed this before.
See http://www.wickham43.supanet.com/fo...idths-test.html
where I've put three versions up online.
The only one that keeps Firefox showing full width and full height is
<table width="100%" border="0" cellspacing="0"
cellpadding="0">
<tr>
<td width="25%"><img src="raindroplets.jpg"/></td>
<td width="25%"><img src="raindroplets.jpg"/></td>
<td width="25%"><img src="raindroplets.jpg"/></td>
<td width="25%"><img src="raindroplets.jpg"/></td>
</tr>
</table>
http://masteraries7.brinkster.net/index.html
that is the URL of my current test version.
Firefox is resizeing them like i want it too, but IE doesnt seem to want to make them smaller than their actual size unless i say i want them Xpx wide or high.
I just realised it wasn't Firefox you were concerned about, but you want IE to resize them.
Since images have a fixed size IE will always display that size unless you code another fixed width, and it adjusts height to suit, as you say.
I've never heard that IE can adjust flexibly to screen size. Maybe javascript can do it. It just shows how much better Firefox is.
LOL, was hoping i wouldnt have to resort to JS, but I may have to. Thanks for the input, i will wait around and see if there are any other ideas before i jump off that cliff.
I've just found this re IE dynamic image resizing:-
http://www.siteexperts.com/tips/elements/ts21/page1.asp
It's obviously very old, referring to IE4 and Netscape but the zoom principle might still work.
That just might work, with some tweaking...thanks, this will be a great help.
This is probably the ultimate solution:-
http://www.webreference.com/program...ages/index.html
http://www.webreference.com/program...t/images/2.html
I haven't tried it.
Alright i THINK i have it working. But i am using IE7 Beta 2 on my laptop to rest it. It doesnt appear to be working on IE6. But i am not sure how it is set up on the computer i am sitting at.
So could someone please go to...
http://masteraries7.brinkster.net/index.html
and tell me if the images are resizing on their IE? And if not does anyone have any idea why it would work on IE7 but not IE6?
EDIT: I was thinking that perhaps Brinkster doesnt allow external .js files, but i tried it offline off my USB, and still nothing. perhaps i am just handling something not quite right, lol.
IE6 still full size images; Firefox still resizing smaller.
hmmm, that is what i was afraid of.
I wonder why it works on IE7, but not IE6...
Here is the entirety of my script...
// JavaScript Document
// resizeHeaderImages makes calls to the sizeTo() function
function resizeHeaderImages(){
if(navigator.userAgent.indexOf('MSIE') != -1){
var width = document.body.clientWidth / 4;
var percentage = width/640;
var height = 480 * percentage;
document.image1.width = width;
document.image1.height = height;
document.image2.width = width;
document.image2.height = height;
document.image3.width = width;
document.image3.height = height;
document.image4.width = width;
document.image4.height = height;
}
}
I think that even when IE resizes the image, it will only resize the width causing the image to distort. You could use a script to sniff the screen resolution and serve the apropriate sized images but of course screen resolution isn't browser size so you will have to hope they don't have to many panels and toolbars open and that the browser is maximised. In reality, you're probably going to have to accept that sometime the images will be cropped slightly to fit the page.
well at the moment i have the script finding the browser size, and resizing them in proportion to that. But for some reason IE isnt resizing them at all. And i am just not sure why, lol.
Browser sizes does not exist in some versions. Only screen resolution. When you change the size of the browser window, the screen resolution stays the same. Try actually changing your display settings and see how it performs.
I hear what you are saying. But on IE6 it isnt reaizing at all, it is displaying the images at their true size, 640x480. I have this monitor set to 1152x864, and the images still come through as a line of 4 640x480 images. I made my screen res, higher and smaller, they remained 640x480.
Any other ideas?
And that was all i heard from them...any ideas here?