Jump to content

Center a Page on pixels


axeblade346
 Share

Recommended Posts

Hiya. I have a Website where I need to center the View on a area of an image (Pixels coordinates must be in the center)http://wurmmapsearch...et/DeliMap.html Current coding is

[/font]<script><!--function XY(y,x){var xt=((x-1)*41)+206;var yl=((y-1)*41)+545;xo.style.top=xt;yo.style.left=yl;ov.style.top=xt;ov.style.left=yl;window.scrollTo(yl-300,xt-300);}// -->[/font][font=times new roman,times,serif]</script>

Note that the +206 and +545 for xt and yl is for the 1x1y coordinates of the map. I tried window.outerWidth window.outerHeight but the don`t give me the effect I want if I get to close to the Edges of the page. (Does the Page need to made larger for it to work 100%?) Current Best I can get is http://i260.photobuc...p/MapCentre.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...