You could also use document.getElementById('myDiv').style.left, but that
will only have a value if you set it in the style attribute.Also, I'm not sure how browsers other than IE would work for that. Spike > -----Original Message----- > From: Justin MacCarthy [mailto:[EMAIL PROTECTED]] > Sent: 20 September 2002 17:47 > To: [EMAIL PROTECTED] > Subject: [ cf-dev ] quick JS / DOM / getElementById > > > Quick question. > > What is the DOM (ie+, ns7+ mozilla) method of getting the > position of a div? > > If I have a <div id="mybutton"><img src="..."></div> > > How do I get the position of the div? > > document.getElementById("mybutton").left is blank.. > > Thanks > > Justin > > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] For human help, e-mail: > [EMAIL PROTECTED] > > -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
