How to stretch background image vertically/horizontally to fill the whole browser window? -
03-22-2009
, 04:55 AM
Assume I have a *.png or *.jpg picture which I define either in the body tag or the
refering CSS defintion as background image.
The dimensions of this image are in general (much) smaller then the later browser window dimensions.
As a result this background image is duplicated mulitple times and appears lets say
10 x 6 times as frames on the final web page.
However I want the background image to be stretched (or even shrinked) according to the
current web browser window dimensions.
The stretching should be applied either
- only horizontally
- only vertically
- both horizontally and vertically
How do I define the three variants mentioned above in html/CSS ?
Wladimir |