[Javascript] Positioning in IE

Hakan Magnusson (Backbase) hakan at backbase.com
Thu Jul 29 08:23:14 CDT 2004


A final correction on your stream of incorrect statements:

> posLeft is a direct instruction and that's why it is faster than 
> pixelLeft, because pixelLeft adds or substracts from the existing value 
> and while doing so it consumes some processing power.
> posLeft will simply overwrite the old value, thats why it is a bit faster.

No. posLeft will use whatever unit previously specified. Meaning that if 
you have something positioned 40% from the left, and change the posLeft 
with +10, it will then be positioned 50% from the left.

The pixelLeft property, however, always uses pixels as the unit.

I hope this clear things up for anybody who was wondering.

> Are we getting smarter and smarter...

Well, are we?

Regards,
H



More information about the Javascript mailing list