Shoutbox

background stretch - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: background stretch (/showthread.php?tid=56484)

background stretch by DJKAL on 03-05-2006 at 03:59 PM

im coding another website and would like to know if it is possable to use a background image and have it to stretch to the size of the veiwes monitor

so if you have a 15" monitor it will be the image in a smaller size
but if you have a 22" monitor you will see the same image but fittingyour screen

is this possable and with what codes?
thanks!


RE: background stretch by John Anderton on 03-05-2006 at 06:35 PM

Correct me if im wrong but i dont think it makes a difference if its a 15 inch monitor or a 22 inch one. Its the resolution that matters. But then again i could be wrong :)

I think cookie knows what im talking about ... i remember him saying something similar once ;)


RE: background stretch by DJKAL on 03-05-2006 at 06:55 PM

the size's were just ideas not actual sizes - ANY size i want.

i just want the image to resize its self to the size of the browser window when the page is loaded


RE: background stretch by Jhrono on 03-05-2006 at 06:55 PM

JA is almost right... The size of the monitor doesnt matter, but each monitor has a maximum resolution, per example, mine is a 17" one, and it can go from 640x480 to 1280x1024..

Back on topic, iirc, there isnt anything you can identify a viewers resolution with.


RE: background stretch by DJKAL on 03-05-2006 at 06:56 PM

so it isnt possible to get the image to auto. resize when the page loads?


RE: background stretch by albert on 03-05-2006 at 06:59 PM

quote:
Originally posted by DJKAL
so it isnt possible to get the image to auto. resize when the page loads?

My advice would be to use a small picture that is symetric. Therefore if it is bigger, it will strech and still look good.

An example of a background I use : http://www.lp15.com/alby/bg.png

You can see it's quite small, but most of all symetric.

How it looks on the page :

http://www.lp15.com/alby

RE: background stretch by Plik on 03-05-2006 at 07:03 PM

quote:
Originally posted by alby
quote:
Originally posted by DJKAL
so it isnt possible to get the image to auto. resize when the page loads?

My advice would be to use a small picture that is symetric. Therefore if it is bigger, it will strech and still look good.

An example of a background I use : http://www.lp15.com/alby/bg.png

You can see it's quite small, but most of all symetric.

How it looks on the page :

http://www.lp15.com/alby

Thats tileing the image, not making it stretch to fit :-/

You can't stretch a background image, the only time you can set the size of an image is when its used in the <img> tag

Which isn't a bad thing because if you stretch your background it will always look mis-shapen and pixelated with someones resolution.
Stretching != cool :p
RE: background stretch by DJKAL on 03-05-2006 at 07:05 PM

no - my image isnt like that.
my image is made in photoshop
and is a dark to light blue fade with the text at the top in an effect and then another image is sunken into the background
it looks realyl effective but i need it to fill the screen always and to not half fill it or be too big


RE: background stretch by Kryptonate on 03-05-2006 at 07:21 PM

quote:
Originally posted by Johny
Back on topic, iirc, there isnt anything you can identify a viewers resolution with.
yes there is. It's called Javascript :p.

RE: background stretch by DJKAL on 03-05-2006 at 07:23 PM

quote:
Originally posted by Kryptonate
yes there is. It's called Javascript

.... can you explain how to do this then?
* DJKAL asks nicely :P
RE: background stretch by Kryptonate on 03-05-2006 at 07:33 PM

quote:
Originally posted by DJKAL
quote:
Originally posted by Kryptonate
yes there is. It's called Javascript

.... can you explain how to do this then?
* DJKAL asks nicely :P
http://www.pageresource.com/jscript/jscreen.htm
RE: background stretch by DJKAL on 03-05-2006 at 07:36 PM

that isnt what i want - i just want the image to be resized automatically and not the page redirected :(


RE: RE: background stretch by Plik on 03-05-2006 at 07:38 PM

quote:
Originally posted by Plik
You can't stretch a background image, the only time you can set the size of an image is when its used in the <img> tag

Which isn't a bad thing because if you stretch your background it will always look mis-shapen and pixelated with someones resolution.
Stretching != cool :p


i hate repeating myself :dodgy:
RE: background stretch by DJKAL on 03-05-2006 at 07:40 PM

i didnt see the edit :dodgy:

so it cant be done :'(
need to find another b-ground that can be as effective then :(
thanks


RE: background stretch by Kryptonate on 03-05-2006 at 07:44 PM

it can't be done indeed. The only thing you can do is depending on the user's resolution replacing the backgroundimage with another one with a different resolution.


RE: background stretch by DJKAL on 03-05-2006 at 07:45 PM

no i dont waant that - never mind thanks


RE: background stretch by Ezra on 03-05-2006 at 08:35 PM

Replacing the background image is the best thing you can do, just resize your image to the most popular sizes like: 800x600, 1024x720, 1280x960, 1600x1200 and replace the image that is closest to the users resolution.


RE: background stretch by DJKAL on 03-05-2006 at 08:37 PM

quote:
Originally posted by Ezra
Replacing the background image is the best thing you can do, just resize your image to the most popular sizes like: 800x600, 1024x,720, 1280x860, 1600x1200 and replace the image that is closest to the users resolution.

thanks - but i think il just go for a mosr basic b-ground that will always work

thanks for all your help though!
RE: background stretch by rav0 on 03-06-2006 at 08:55 AM

CSS3 will let you set the size of the image to, but CSS3 isn't released yet.