title: How can I quickly find the relatively positioned HTML parent element of an absolutely positioned child?
body: <p>I am working with the following code:</p>
  
  <pre><code>&lt;div&gt;
      &lt;div&gt;
          &lt;div&gt;
              &lt;div&gt;
                  &lt;div&gt;
                      &lt;div&gt;
                          ...
                              &lt;div class="absolute"&gt;Lorem ispum&lt;/div&gt;
                          ...
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  .absolute {
    position: absolute;
  }
  </code></pre>
  
  <p>Using Chrome's DevTools, I'd like to be able to quickly find which parent <code>&lt;div&gt;</code> element has <code>position: relative</code>, so I can know which parent element is determining the origin point of my absolutely positioned element. I can manually inspect each of the divs to find the first parent that is set to <code>relative</code> but I'm working with a deeply nested tree, so I'm wondering if there is a faster way to find the parent I'm trying to find. A Javascript snippet for the console would be an example of a suitable solution.</p>