473,387 Members | 1,420 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

Jul 20 '05 #1
3 5956
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)
Jul 20 '05 #2
rf wrote:
"Victor Louie" <vl******@hotmail.com> wrote in message
news:sD*********************@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
Jul 20 '05 #3
rf

"Victor Louie" <vl******@hotmail.com> wrote in message
news:5n*********************@news0.telusplanet.net ...
rf wrote:
"Victor Louie" <vl******@hotmail.com> wrote in message
news:sD*********************@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.
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: jeff | last post by:
Hiya, Im currently in the process of developing a picture browser, I want it to run off a CD, basically I have 2 questions for the group. The first is how do I get the program to only view the...
2
by: Lyn | last post by:
I am trying to embed a picture into a Bound Object Frame (Me!Photograph) with the following code which is based on MS article http://support.microsoft.com/?id=158941: strPathname =...
3
by: Z D | last post by:
Hello, BACKGROUND: ============== I've created a Windows User Control that contains an Image Control (among other controls). The user control handles the picture resize event. Whenever the...
5
by: VJ | last post by:
Is there a any known easy way to fit web pages for a screen resolution. Can I do this programmatically? VJ
2
by: jodleren | last post by:
Hi! I am making an option, which opens a small window with a picture in it and data about it. I just want a JS script, which will get the picture size, and then set the window accordingly? ...
4
by: Jsnova864 | last post by:
I'm trying to make make the background of the form a picture. So far I got this. Private Sub Form_Load() FrmStarship.WindowState = vbMaximized FrmStarship.Picture = LoadPicture(App.Path &...
2
Ali Rizwan
by: Ali Rizwan | last post by:
Hi all, Following Code will allow you to run any AVI file in a Picture Box. Comment and Rate it! API Declarations Const WS_CHILD = &H40000000 Private Declare Function...
1
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.