On Sat, 16 Apr 2005 12:34:02 +0100, Jeremy Keith <[EMAIL PROTECTED]> wrote:

I'm using W3C DOM and events (I don't care about IE-compatibility)

Actually, IE has very good DOM support.

I've mentioned DOM events, which it apparently doesn't support (add/removeEventListener).

Thanks for the tip about HTML-DOM. I've found it's specs on w3c
(I've missed that before).

 Which way of getting position and size of elements on page is supposed
 to be the proper one?

Ah, the CSS-DOM. A whole other kettle of fish :-)

Wherever possible, try to use the "style" property: element.style.styleProperty
The big problem with reading style properties like this is that it only works when the style properties have either been set using JavaScript or using inline styles. In other words, it *won't* pick up styles declared in external stylesheets :-(

there is getCurrentStyle() for that, but it won't give me x/y position in pixels of statically positioned object, and that's what I'm looking for.

I know PPK's site, but it focuses on what works in old broken browsers,
and I'd like to know proper methods that are supposed to work in future,
standards-compiliant browsers.

--
regards, Kornel Lesiński

******************************************************
The discussion list for  http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************



Reply via email to