You can try this code:[color=blue]
>
>
>
>
>[/color]
<!--- filename: mypage.html ---->
<html>
....blah blah blah
<script language=JavaSc ript src=/Javascript/center.js></script>
</html>
/*************** *************** *
filename: center.js
*************** *************** **/
var xMax = screen.width, yMax = self.screen.ava ilHeight;
if (document.body. clientWidth)
{
lnBodyClientWid th=document.bod y.clientWidth
lnBodyClientHei ght=document.bo dy.clientHeight
}
else
{
lnBodyClientWid th=window.inner Width
lnBodyClientHei ght=window.inne rHeight
}
xOffset = (xMax - lnBodyClientWid th)/2, yOffset = (yMax -
lnBodyClientHei ght)/2;
self.moveTo(xOf fset,yOffset)
<!-- javascript size resize browser client width window offset move -->
>
>
>
>
>[/color]
<!--- filename: mypage.html ---->
<html>
....blah blah blah
<script language=JavaSc ript src=/Javascript/center.js></script>
</html>
/*************** *************** *
filename: center.js
*************** *************** **/
var xMax = screen.width, yMax = self.screen.ava ilHeight;
if (document.body. clientWidth)
{
lnBodyClientWid th=document.bod y.clientWidth
lnBodyClientHei ght=document.bo dy.clientHeight
}
else
{
lnBodyClientWid th=window.inner Width
lnBodyClientHei ght=window.inne rHeight
}
xOffset = (xMax - lnBodyClientWid th)/2, yOffset = (yMax -
lnBodyClientHei ght)/2;
self.moveTo(xOf fset,yOffset)
<!-- javascript size resize browser client width window offset move -->
Comment