f



Adjusting a picture to the size of a window

Hi,

I'm a newbie...I'm having trouble changing the size of an image when I 
use different window sizes when loading the and resizing the browser window.

If anyone could help it would be appreciated.

Thanks

Victor

0
Victor
6/27/2003 11:11:20 AM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

3 Replies
956 Views

Similar Articles

[PageSpeed] 5

Victor Louie wrote on 27 jun 2003 in comp.lang.javascript:

> I'm a newbie...I'm having trouble changing the size of an image when I
> use different window sizes when loading the and resizing the browser
> window. 

<body>
<img src=".." style="width:100%;height:100%;">
</body>

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
0
Evertjan
6/27/2003 11:27:15 AM
rf wrote:
> "Victor Louie" <vlouie21@hotmail.com> wrote in message
> news:sDVKa.35771$Mc4.5064295@news0.telusplanet.net...
> 
>>Hi,
>>
>>I'm a newbie...I'm having trouble changing the size of an image
> 
> 
> Why do you want to change the size of an image?
> 
> 
>>when I
>>use different window sizes
> 
> 
> When *you* use different window sizes? Don't understand.
> 
> 
>>when loading the and resizing the browser window.
> 
> 
> Your browser window or mine. If you resize mine then you have lost me as a
> viewer. Instantly.
> 
> Cheers
> Richard.
> 
> 
I'm trying to resize a spacer image on the bottom on the left of my page 
so that that it will stretch to the bottom the page (it's fixed at 
181x119 for now) because I get this:

http://pector.homelinux.com/main/index2.html

when the content on the right goes further down that the menu on the left.

If the left side is longer than the content on the right side...then it 
looks fine (http://pector.homelinux.com/main/)...which is what I'm 
trying to get it to look like

If there is a better alternative to JavaScript could you let me 
know...b/c I'm pretty sure PHP won't work (b/c I'm a lot better at that :)).

Hopefully this clears it up...its been a long night.

Thanks

Victor


0
Victor
6/27/2003 12:02:09 PM
"Victor Louie" <vlouie21@hotmail.com> wrote in message
news:5nWKa.35809$Mc4.5066644@news0.telusplanet.net...
> rf wrote:
> > "Victor Louie" <vlouie21@hotmail.com> wrote in message
> > news:sDVKa.35771$Mc4.5064295@news0.telusplanet.net...
> >
> >>Hi,
> >>
> >>I'm a newbie...I'm having trouble changing the size of an image
> >
> >
> > Why do you want to change the size of an image?
> >
> >
> >>when I
> >>use different window sizes
> >
> >
> > When *you* use different window sizes? Don't understand.
> >
> >
> >>when loading the and resizing the browser window.
> >
> >
> > Your browser window or mine. If you resize mine then you have lost me as
a
> > viewer. Instantly.
> >
> > Cheers
> > Richard.
> >
> >
> I'm trying to resize a spacer image on the bottom on the left of my page
> so that that it will stretch to the bottom the page (it's fixed at
> 181x119 for now) because I get this:
>
> http://pector.homelinux.com/main/index2.html
>
> when the content on the right goes further down that the menu on the left.
>
> If the left side is longer than the content on the right side...then it
> looks fine (http://pector.homelinux.com/main/)...which is what I'm
> trying to get it to look like
>
> If there is a better alternative to JavaScript could you let me
> know...b/c I'm pretty sure PHP won't work (b/c I'm a lot better at that
:)).
>
> Hopefully this clears it up...its been a long night.

This has nothing to do with javascript, unless you are trying to apply a
bandaid to a flawed layout. It also has nothing at all to do with PHP. PHP
is server side.

You have run into the standard using tables for layout problem, compounded
by the use of row and column span.

Specifically: as  the table grows vetically so do its cells. Your right hand
cell grows, where to we apportion that growth over the left hand cells. Over
all of them, of course. Your layout falls apart.

You have two choices:

a) Use CSS for layout, not tables. Tables are designed for laying out
tabular data, not web pages.

b) Put the entire left hand nav column in a seperate nested table. Your
outer table becomes a two by two table, rowspanned at the top. The left hand
cell contains your nav table, valigned top.

Cheers
Richard.


0
rf
6/27/2003 12:30:04 PM
Reply: