its not my logic i need to elaborate but my misunderstanding of the default value which (deep in my mind was NOT static but simply "unset").
and the "static" logic came from several other "solutions" (as mentioned initially in this post) and i mixed the meaning of static === fixed, so i kept it in. i changed your function a little bit and it seems to do what i expected .. thanks Elements.implement({ getMaxZindex: function() { return Math.max.apply(Math, this.map(function(el) { var zIndexValue = el.getStyle('z-index').toInt(); return zIndexValue > 0 ? zIndexValue : 0; })); } }); On 2 Jan., 11:34, Dimitar Christoff <christ...@gmail.com> wrote: > erm - sorry but the implied position on an element is > static:https://developer.mozilla.org/en/CSS/position > if it's not implicitly specified as a property, it WILL come back as > 'static'. so for all these divs in your testhttp://jsfiddle.net/advQJ/1/, > position IS static, hence they are > ignored and the only absolute element with z-index 1 is being > returned. > > do you care to elaborate on your goals / logic a little :) > > On 2 January 2012 06:21, Timo Henke <ultrakr...@googlemail.com> wrote: > > > > > > > > > misunderstanding, sry ... if there is no position set in the div's > > style the result is always 1 - the static check is correct.