Click to See Complete Forum and Search --> : offsetleft and offsettop


dizzy
06-24-2003, 11:59 AM
i want to position a javascript using percentages instead of pixels like using the offsetleft and offsettop commands. How do i go about doing this? Need help please

var offsetleft=85 i know i just can't add a percent sign so what do i do?

Jona
06-24-2003, 12:05 PM
You'd have to use pixels, to an extent. Not sure what you want, but for IE you'd use document.documentElement.offsetTop or document.body.offsetTop (if documentElement doesn't exist for that version) and for Netscape you can use document.body.pageYOffsett (I *think*).

[Jona]