How to get position information of HTML element

css, firebug, google-chrome-devtools, html, position

Solution

Works in Chrome, Safari, and Firefox:

- Right-click the `<div>` and choose 'Inspect Element'.

- In the inspector choose the "Console" tab and type in `$0.offsetParent`. Press enter.

- The result is the offset parent of your selected element.

Bonus: In Chrome and Safari, If you right-click the result in the console you can reveal it in the elements panel.

Problem

I have a `div{position:absolute}`. From w3cschools: absolute - The element is positioned relative to its first positioned (not static) ancestor element Is there an easy way with browser inspector(Chrome, Firebug) to get the first not static ancestor, to which my div was positioned relatively?

Original source