[thelist] simple questions

MRC webmaster at equilon-mrc.com
Mon Feb 4 10:22:01 CST 2002


Vic,

> <body background="your background image" bgproperties="fixed">
>
> bgproperties="fixed" will do it.
>
> This only works with IE!

    Actually, there isn't any good reason to use the Microsoft-proprietary
bgproperties attribute over CSS. The bgproperties attribute was added for IE
3, but IE 3 does understand standards-compliant CSS background properties so
long as they are presented using the shorthand background property [1],
e.g.:

body
{
  background: #000000 url("background.gif") no-repeat fixed top left ;
}

    For foreground images, the position: fixed property/value combination
would serve Peter well, except that no current version of IE supports it. In
that case, you need to use scripting to continually reposition the image
based on the scrolled position of the window -- and I have never seen this
done without resulting in an obvious and annoying stutter (although some
sites use a somewhat more elegant, gentle "bounce", but I can't come up with
a URL at the moment).

James Aylard

1. http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background




More information about the thelist mailing list