Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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+?

irt.org | Knowledge Base | DHTML | Q1200 [ previous next ]

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+?

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.


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.