Donate SIGN UP

HTML code needed

Avatar Image
davver | 23:20 Tue 08th Oct 2002 | Technology
2 Answers
how can I get the background to a web page to stretch to whatever size the viewer has their page set at - 800x600, 1024x768, etc? There must be some way of doing this, can you help me please?
Gravatar

Answers

1 to 2 of 2rss feed

Best Answer

No best answer has yet been selected by davver. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
You can't. In HTML anyway :-) In Javascript, you can detect the screen dimensions (or window dimensions), and change the file used for a background - obviously you'd need different standard resolutions as separate image files. For a REALLY fancy way of doing it, you could use PHP to dynamically resize a background image having been given precise dimensions as two variables. Either way, for browser compatibility, you might need to place the background image on a layer at pos 0,0, behind everything else.
Also: as stated in some of my previous answers, www.irt.org is a great place to pick up web development experience as it has extensive FAQs for this sort of thing.

1 to 2 of 2rss feed

Do you know the answer?

HTML code needed

Answer Question >>