Image Width Question

liunx

Guest
Hey everyone,<br />
I have a question that may be pretty basic, but I'm not sure.<br />
I have a frameset, and the top frame only contains an image that I use as a title bar for my entire site. However, depending on the user's settings or browser settings or window sizes, the image will show up differently. Is there any way I can specify the image width to stretch across the entire frame. (And leave height alone, thus preserving aspect ratio?)<br />
<br />
I don't suppose I could use something like:<br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"title.jpg" width="100%"><br />
or something similar, could I?<br />
<br />
The temporary URL for the site is <!-- m --><a class="postlink" href="http://www.cse.buffalo.edu/~kkamholz/SYK">http://www.cse.buffalo.edu/~kkamholz/SYK</a><!-- m --> .<br />
It has a few pictures in the top frame now, but I will combine them all into one image that I would like to stretch across the entire frame.<br />
<br />
I'd really appreciate any input.<br />
Thanks a lot.<br />
<br />
- Keith<br />
<br />
BTW, does the site look professional?<!--content-->Yeah, you can specify a % for a width, but I wouldn't do it. rather, make different images that you will display depending on the uses screen res. If you just stretch and image, it will look horrible at a very large (or small) screen res.<!--content-->Thanks....<br />
<br />
But would it really look that bad? It seems like I can make the image fairly high quality and fairly large, and when it is stretched it shouldn't lose much quality. The load time for a larger image would be acceptable, because it's in a frame and would only be loaded once. However, I could be wrong, maybe it would just look bad.<br />
<br />
If I did go with your method of using a different image for each screen resolution, how would I detect the user's res?<br />
<br />
Thanks for the help.<br />
<br />
- Keith<!--content-->This will detect for 640x480 or less, 800x600, and 1024x768 or more.<br />
<br />
<script type="text/javascript"><br />
<br />
if (screen.width<=640) //if 640x480<br />
document.write('<img src=http://www.webdeveloper.com/forum/archive/index.php/yourimg2.gif />');<br />
<br />
else if (screen.width==800) //if 800x600<br />
document.write('<img src=http://www.webdeveloper.com/forum/archive/index.php/yourimg.gif />');<br />
<br />
else (screen.width>=1024) //if 1024x768<br />
document.write('<img src=http://www.webdeveloper.com/forum/archive/index.php/yourimg3.gif />');<br />
<br />
//--><br />
</script><br />
<br />
Originally posted by Sandman2383<br />
But would it really look that bad?I'm guessing it would if you just stretch it on the x axis. If you streatch it both ways, it would probably be okay.<!--content-->Ok, thanks a lot for the input. It's very helpful.<br />
<br />
I think that if I only specify a percentage for the width, that the height will change to preserve the aspect ratio. However, if it doesn't, I may have to try your solution.<br />
<br />
Once again thanks a lot for the input!<br />
<br />
- Keith<br />
<br />
Also, from anyone else willing to check it out, I'm still kinda wondering if the site looks professional or not....<!--content-->Originally posted by Sandman2383 <br />
Also, from anyone else willing to check it out, I'm still kinda wondering if the site looks professional or not.... There are two kinds of people who ask that question. People who really want to know, and people who just want to hear what a great job they are doing. Since you asked twice, I'm going to assume your the former. If not, disregard my comments, because they won't be pumping you site up.<br />
<br />
Your FlashButtons.com menu isn't bad. Get rid of the red font. It is hard/annoying to read. Do the same with your scrollbars. Your logo (top left) is nice. The pictures are not -- they are obviously amature. Lose the custom <HR> (line.gif) or change it.<br />
<br />
I haven't made many sites in black, and for the one that I did, the server is down right now, so I can't give you a link. :( If you are interested, I could probably give you a few screenshots or something, though.<br />
<br />
Again, I hope I haven't offended you, but those are my comments. <br />
<br />
Cheers. :)<!--content-->
 
Back
Top