a few images in my site that i have set the width to 100% (to conform to smaller/larger resolutions) start doing weird things like blinking in netscape 6. it only does it every once in a while though. has anyone else had this problem?
| SitePoint Sponsor |


a few images in my site that i have set the width to 100% (to conform to smaller/larger resolutions) start doing weird things like blinking in netscape 6. it only does it every once in a while though. has anyone else had this problem?
Netscape 6 is very buggy and unpopular. It is based on edited Alpha code if you like. Just wait til Netscape 6.5 that is when things will get hot. I suggest you download Mozilla 0.9 and see if it stills does this.
Garlic bread, I've tasted it, it's the future
The width attribute of images will only be validate HTML is specified in pixels, NOT percentages. Have a look at:
www.w3.org
for for indepth specifications.


noooooooooooo.Originally posted by Nicky
The width attribute of images will only be validate HTML is specified in pixels, NOT percentages. Have a look at:
www.w3.org
for for indepth specifications.oh well, this is where me and specifications divide. there are a lot of uses for percentages that pixels just can't cover.
I can't see why you would scale an image anyway since browser image rendering engines are dubious at best, when it comes to this. Photoshop they are not![]()
Drinky


i agree with Drinky.. scaling an image in the browser distorts the image alot.. but if you are insistant on doing it.. and since you are having percentage problems you could try this code.. it works, but i still would recomend finding another way, such as making a 3 or 4 different images of different sizes and using javascript to detect the browser width and use the appropriate image..
Code:<html> <head> </head> <body> <script language="javascript"> if(document.all) {imgwidth=document.body.clientWidth;} else if(document.layers) {imgwidth=window.innerWidth;} //innerWidth is what i was told works in netscape //but i dont have netscape, so i didnt try it. imgwidth = imgwidth - 30 //this minus 30 accounts for about the width of the scroll bar, //you can remove or change it. document.write("<img src='picture.gif' width='" + imgwidth +"' height='30'>") </script> </body> </html>
Last edited by bman; May 9, 2001 at 09:20.
Some say the world will end in fire, Some say in ice.
From what I've tasted of desire
I hold with those who favor fire.


Originally posted by bman
i agree with Drinky.. scaling an image in the browser distorts the image alot..
not on my page is doesn'tgo to http://www.psitanksdev.com, the images that are being resized are the gray and blue lines at the very top. the only browsers that are having problems are netscape 6 and the current version of mozilla. even then if you reload the page they will work in those browsers. so i'm going to keep it and hope nobody notices
![]()
Bookmarks