HighDots Forums  

How to stretch background image vertically/horizontally to fill the whole browser window?

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss How to stretch background image vertically/horizontally to fill the whole browser window? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wladimir Borsov
 
Posts: n/a

Default 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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.