W3C home > Mailing lists > Public > www-style@w3.org > August 1997

background height and width

From: David Perrell <davidp@earthlink.net>
Date: Tue, 26 Aug 1997 10:39:44 -0700
Message-Id: <199708261746.KAA23663@iceland.it.earthlink.net>
To: "Style" <www-style@w3.org>
Hopefully, CSS will have environment variables for window height and
width in the next incarnation. Along with implementation of those
variables, a way is needed to use them for sizing of background images.

The addition of height and width to background properties would greatly
enhance an author's options for creating interesting backgrounds.
Watermarks could be added that adjust to the reader's window size while
remaining centered. Gradient fills of any complexity could be used in
either the horizontal or vertical dimension, without the use of a
full-screen bitmap.

For example, consider a bitmap grad.png that is one pixel wide and 256
pixels high, with a color gradient from dark blue at top to medium cyan
at bottom. As a 24-bit PNG, this is only 1K.

If height and width properties were added to background, and window
height and width were represented by the environment variables $HEIGHT
and $WIDTH, this markup:

  BODY { background-image: url(grad.png);
         background-height: $HEIGHT;
         background-width: $WIDTH;
         background-attachment: fixed }

would produce a fixed gradient fill that fills the window no matter how
the window is sized.

David Perrell
Received on Tuesday, 26 August 1997 13:46:05 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:44 UTC