You are here: irt.org | FAQ | DHTML | Q1792 [ previous next ]
To centre a layer called bg call this script onload...
<script language="JavaScript"><!-- function placebg() { document.all('bg').style.posLeft = (document.body.clientWidth/2) - (bg.offsetWidth/2); document.all('bg').style.posTop = (document.body.clientHeight/2) - (bg.offsetHeight/2); } //--></script>
Submitted by Dave