I have an absolutely positioned [element] such that in the CSS, I’ve explicitly set its left property to -9999px. I have not set the top property. I cannot set it, since I want the element to “stay” where it is in the DOM (even though it’s out of the document flow)
When I call [element].css(‘top’) in jQuery, FF returns a value. IE and Safari return ‘auto’. Is there a way to get the top value in IE/Safari? The CSS top value seems to be different than the top value coming from .offset().
autois a valid setting for thetop:setting, so no, that’s what it actually is. I’ll also throw in that Chrome showsautoas well. You’ll have to use.offset().top.It’s also worth noting that I’m getting 10 for both
.css('top')and.offset().topin Firefox using http://jsfiddle.net/HVxtd/http://www.w3.org/TR/CSS2/visuren.html#position-props