Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1200 How can I make a watermark that floats and remains in the same location whilst I scroll through a document in either Netscape Navigator 4+ or Internet Explorer 4+?

You are here: irt.org | FAQ | DHTML | Q1200 [ previous next ]

Try:

<html>
<head>
<script language="JavaScript"><!--
function pageOffset() {
    if (document.layers) {
        document.layers['layerName'].pageX = window.pageXOffset + 10;
        document.layers['layerName'].pageY = window.pageYOffset + 10;
    }
    else if (document.all) {
        document.all['layerName'].style.posLeft = document.body.scrollLeft + 10;
        document.all['layerName'].style.posTop = document.body.scrollTop + 10;
    }
    setTimeout('pageOffset()',100);
}
//--></script>
</head>

<body onLoad="pageOffset()">
<div id="layerName" style="position: relative" left="10" top="10">Watermark</div>

...

</body>
</html>

Check out the last answer to FAQ 1201 for a solution that works in Netscape Navigatpr 6.

©2018 Martin Webb