On this page ...
Fixed Background - Non-scrolling
Background
This little trick locks the background
pattern, so if you scroll, you will notice the content moving, but
NOT the background.
This is a trick you don't often but
it's a rather cool thing (if the background of your website is suitable
for this feature - mine isn't).
The downside is that it only works
for Internet Explorer 4 and newer.
This trick is based by on a stylesheet
feature.
|
 |
The Trick
Put this in the <HEAD>-part of you document:
<STYLE TYPE="text/css">
<!--
BODY { background: url(/../images/mybackground.gif) fixed }
-->
</STYLE>
Make sure the background is not dominating your content,
or the background is not somehow stringly related to the content.
You can get the same effect by adding
bgproperties="fixed"
in the <body> tag as such:
<body background="/../images/mybackground.gif"
bgproperties="fixed">
This does not work in Netscape.
|