Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

resizing images to fit in available frame 1

Status
Not open for further replies.

ryansupak

MIS
Jul 23, 2002
39
US
hi,

i've got a frame, the width of which utilizes whatever remaining space there is on the screen. (this amount will change, of course, with different-sized monitors.)

this frame contains an image and its corresponding image map. i would like to stretch the image to fill whatever space is available in the frame, but i only want it to stretch by width.

i don't want the image to lose its original height-to-width ratio either.

is there a parameter within "img" that does this?

thanks in advance,
rs

 
"i only want it to stretch by width"
"i don't want the image to lose its original height-to-width ratio either."


I don't see how you can stretch the width only of an image yet still keep the ratio. Hope I helped / Thanks for helping
if ((x<10&&y<10) &&(((parseInt(x.toString()+y.toString())-x-y)%9)!=0)){ alert(&quot;I'm a monkey's uncle&quot;); }
 
i was worried that what i wrote might be unclear.

to be more specific, i want the width of the picture to be stretched to the capacity of the frame. i want the picture to be as wide as possible while retaining the aspect ratio.

also, is there a way to make the image's image map stretch with it?

thanks again,
rs
 
Oh, I see. Well if you put
<img src=&quot;yourgif.gif&quot; width=100%>
I know IE stretches the height too, to keep the aspect ratio. This will fill the available frame width.
I'm not sure if NN does the same though.
I'm afraid I don't know about the image map, sorry. Hope I helped / Thanks for helping
if ((x<10&&y<10) &&(((parseInt(x.toString()+y.toString())-x-y)%9)!=0)){ alert(&quot;I'm a monkey's uncle&quot;); }
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top