Dear Friends, I need a little help from you programmers My problem is i want a image to be loaded according to the client resolution of screen. That means image will get fit with his screen only if the image resolution is more then the client screen. But if it is less then that, than it shouldn't resize it. First i thought using the %, it would work. But if you use % then it will resize the small images also. Again, i thought to use some condition like if the image size is more then a basic size then it would resize either it wouldn't. But still doesn't solve the problem perfectly. I want some way which will help me to resolve both. Thanks regards
You could use javascript to detect client's screen width and browser: <script language="javascript"> function Browser() { this.name = navigator.appname; this.screenwidth = screen.width; } </script> and then call it somewhere on the page: <script language="javascript"> var a= new Browser(); if(a.screenwidth==800) document.write('<IMG SRC=image1.jpg>'); if(a.screenwidth==1024) document.write('<IMG SRC=image2.jpg>'); </script> But it wouldn't work if the client has JS disabled