Age old question: How to make an image stretch to 100% of window

L

Lee Harris

Here is my web page
http://www.bombersgolf.com/BLT/home.html

I want to change the top pane which currently has a gif on top of a
background colour and replace it with a single image which I have optimised
to 1024*200. It won't tile well, so I would like to know how (ideally
fitting in with the html I have there now) I can put my image in place so
that it will fit exactly once across the top of the page, stretching or
contracting if the screen size is not 1024

thanks in advance
Lee
 
S

Steve R.

Lee Harris wrote in message ...
I want to change the top pane which currently has a gif on top of a
background colour and replace it with a single image .....

It seems to work ok as it, merging into the background colour.

The only thing I'd add that it's too tall taking up 200 pixels in height on
every page. You are forgetting the viewers who are using 800x600 who are
losing a large proportion of their viewing area because of the height of
the image, which will require a lot more *unnecessary* vertical scrolling.

Also the forum opens in a 'new window' instead pof being part of the
website.
 
T

Toby A Inkster

Lee said:
I can put my image in place so
that it will fit exactly once across the top of the page, stretching or
contracting if the screen size is not 1024

<img src="foobar" alt="Foo Bar" style="height: 128px; width: 99%;">
 
L

Lee Harris

Steve R. said:
Lee Harris wrote in message ...

It seems to work ok as it, merging into the background colour.

The only thing I'd add that it's too tall taking up 200 pixels in height on
every page. You are forgetting the viewers who are using 800x600 who are
losing a large proportion of their viewing area because of the height of
the image, which will require a lot more *unnecessary* vertical scrolling.

Also the forum opens in a 'new window' instead pof being part of the
website.

No, the image I want to use is 1024*200 as mentioned in the original post.
It can't be bled into a background colour as it is a "proper picture".
Thanks for the advice about 200 tall, I may have to narrow it up,but still
need to know how to make it stretch once across the window, whatever the
size, akin to <img src="x.jpg" width="100%"></img> kind of idea

The forum window intentionally opens in a new window, although I know some
consider that to be bad form
 
L

Lee Harris

Steve R. said:
Steve R. wrote in message ...

Trying to be helpful now, you could make the forum as part of the website
by using a header frame like this, then the menus links to the frameset.
http://freespace.virgin.net/temp.files/frames/top_bottom.htm

It's even more important now to make your image/s at the top a lot less
tall :~}

I thought frames were the spawn of satan!
anyway, hope you spotted my other reply about the image- the one shown is
not the one I am intending to use, so your initial reply won't work
thanks mate
 
D

Daniel Ruscoe

Lee said:
Here is my web page
http://www.bombersgolf.com/BLT/home.html

I want to change the top pane which currently has a gif on top of a
background colour and replace it with a single image which I have optimised
to 1024*200. It won't tile well, so I would like to know how (ideally
fitting in with the html I have there now) I can put my image in place so
that it will fit exactly once across the top of the page, stretching or
contracting if the screen size is not 1024

Re-sizing images with a browser is a bad idea, but:

http://www.dualstone.co.uk/stuff/bombers/home.html

Check the page source and the bottom of your style sheet:

http://www.dualstone.co.uk/stuff/bombers/style100.css

Personally, I think the original looks fine. Why not just keep the logo
on the left?
 
S

Steve R.

Lee Harris wrote in message ...
I thought frames were the spawn of satan!

Nothing wrong with using frames if they are done *properly*.

The problem is that the HTML nesgroups are dominated by 'purists' but in
the real world frames are alive and working ok in most instances :~)
 
M

Mark Parnell

Lee Harris wrote in message ...

Not quite, but they are definitely A Bad Thing(TM).
Nothing wrong with using frames if they are done *properly*.

There is a lot wrong with frames, partly because they are rarely, if
ever done properly. And the alternatives are generally a lot less work
than doing the frames properly in the first place.
The problem is that the HTML nesgroups are dominated by 'purists' but in
http://ppewww.ph.gla.ac.uk/~flavell/www/html-smac.html

the real world frames are alive and working ok in most instances :~)

Depends on your definition of "working". :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top