resizing images to different resolutions

liunx

Guest
I am using visual studio.net to develop a website. how do i make it so that when the page is viewed in different resolutions that it looks exactly the same. <br />
i am developing on a 17" monitor and when i opened up the application it was way out. I am using frames and have expressed the sizes in percentages.<!--content-->there are numerous ways to do it but you didn't specify if you wanted to use a server side language or client side.<br />
<br />
However the way that will work in files with a .HTML extension is.<br />
<br />
<script language="Javascript"><br />
function redirect(){<br />
if screen.width == 800 {<br />
window.location.replace("index800.html")<br />
}<br />
else if screen.width == 1024 {<br />
window.location.replace("index1024.html")<br />
}<br />
else {<br />
window.location.replace("other.html")<br />
}<br />
}<br />
</script><br />
<body onload="redirect"><br />
<br />
that will be your home page which should stay blank, then it will redirect you depending on the screen resolution, long winded I know but it will do the trick.<br />
<br />
EDIT:<br />
<br />
<script language="Javascript"> <br />
function resize(){ <br />
if screen.width == 800 { <br />
document.image1.width=64 <br />
document.image1.height=64 <br />
document.image2.width=128} <br />
else if screen.width == 1024 { <br />
document.image1.width=80 <br />
document.image1.height=80 <br />
document.image2.width=170} <br />
} <br />
else { <br />
document.image1.width=10 <br />
document.image1.height=10 <br />
document.image2.width=18} <br />
} <br />
} <br />
</script> <br />
<body onload="resize()"> <br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"SOURCE" name="image1"><br />
<br />
that'll work too I think.<br />
<br />
Gaz.<!--content-->thanks mate, that has helped me heaps, thanks for the one importing tif files into paint shop that worked as well. your a legend<!--content-->Originally posted by CrazyGaz <br />
...that will be your home page which should stay blank...13% of users do not use JavaScript. That first page needs to be a default page that works onany screen resolution.<!--content-->I had errors in my edit.<br />
<script language="Javascript"> <br />
function resize(){ <br />
if (screen.width == 800) { <br />
document.image1.width=64 <br />
document.image1.height=64 <br />
} <br />
else if (screen.width == 1024) { <br />
document.image1.width=80 <br />
document.image1.height=80 <br />
}<br />
else {<br />
document.image1.width=80 <br />
document.image1.height=80<br />
}<br />
} <br />
</script> <br />
<body onload="resize()"> <br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"file:///C:/my%20documents/pic1.png" name="image1" width="320" height="240"> <br />
<br />
Gaz.<!--content-->i am only just trying out this code now, because i have so many images i am curious as to whether there is an easier way or not? i dont really want to have to go through every image and work out what it should be calculated to when it changes resolution. also that only changes the image size, what about the text, it will overlap the images.<br />
is server side scripting the best option?<!--content-->
 
Back
Top