title: Floating html/css div above content adjacent to its parent
body: <p>I'm trying to design an html/css document showing a list of items in one div with content in a separate div to the right of that list.  Each list item includes a hidden description that can be revealed, for example, when a user hovers over a certain &quot;more info&quot; box.  However, I want that hidden description to be displayed vertically adjacent to its item in the list and to the right of the list div (thus floating above the content to the right of the list div).</p>
  <p>To clarify my intent, I've created the following example.  Each item in the list has a div styled to show a hidden information box when the cursor hovers over the div.
  However, the default placement of the information box is not where I want it (see note in the demo), and even if it were, it doesn't follow its item when scrolled.</p>
  <p>I know I can set a parent of the floating-more-info-box div to &quot;display: relative&quot; to control the position of the floating-more-info-box div, but then it will be positioned within the content of it's parent and not float on top of the adjacent gray content.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>&lt;style&gt;
      .empty-but-cannot-get-code-snipit-to-work-without-this {
      }
      .outer-container {
        display: flex;
        flex-direction: row;
      }
      .list-column {
          width: 11rem;
          height: 10rem;
          background-color: white;
          overflow: auto;
          position: relaive;
          border: 3px solid green;
      }
      .placeholder {
          height: 10rem;
      }
      .placeholder.left {
          width: 5rem;
          background-color: palegoldenrod;
          border: 3px solid goldenrod;
      }
      .placeholder.right {
          width: 20rem;
          background-color: gray;
          border: 3px solid darkslategray;
      }
      .item {
          height: auto;
          padding: 0.4rem;
          border-width: 1px 0 1px 0;
          border-color: green;
          border-style: solid;
      }
      .hover-activator {
          border-radius: 2rem;
          border: 2px solid ;
          padding: 0 0.5rem 0 0.5rem;
          width: fit-content;
          cursor: pointer;
      }
      .floating-more-info-box {
          display: none;
          position: absolute;
          background-color: yellow;
          padding: 0.5rem;
      }
      .item:hover .floating-more-info-box {
          display: flex;
      }
  &lt;/style&gt;</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="outer-container"&gt;
      &lt;div class="placeholder left"&gt;&lt;/div&gt;
  
      &lt;div class="list-column"&gt;
          &lt;div class="item"&gt;
              &lt;label&gt;name: Item 1&lt;/label&gt;
              &lt;div class="hover-activator"&gt;
                  Hover for more info
                  &lt;div class="floating-more-info-box"&gt;
                      I want this aligned vertically with Item 1 but hovering to its right (floating on top of the gray placeholder) even when scrolled
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="item"&gt;
              &lt;label&gt;name: Item 2&lt;/label&gt;
              &lt;div class="hover-activator"&gt;
                  Hover for more info
                  &lt;div class="floating-more-info-box"&gt;
                      I want this aligned vertically with Item 2 but hovering to its right (floating on top of the gray placeholder) even when scrolled
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="item"&gt;
              &lt;label&gt;name: Item 3&lt;/label&gt;
              &lt;div class="hover-activator"&gt;
                  Hover for more info
                  &lt;div class="floating-more-info-box"&gt;
                      I want this aligned vertically with Item 3 but hovering to its right (floating on top of the gray placeholder) even when scrolled
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="item"&gt;
              &lt;label&gt;name: Item 4&lt;/label&gt;
              &lt;div class="hover-activator"&gt;
                  Hover for more info
                  &lt;div class="floating-more-info-box"&gt;
                      I want this aligned vertically with Item 4 but hovering to its right (floating on top of the gray placeholder) even when scrolled
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="item"&gt;
              &lt;label&gt;name: Item 5&lt;/label&gt;
              &lt;div class="hover-activator"&gt;
                  Hover for more info
                  &lt;div class="floating-more-info-box"&gt;
                      I want this aligned vertically with Item 5 but hovering to its right (floating on top of the gray placeholder) even when scrolled
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="placeholder right"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Is there a pure html/css solution to this problem or will I have to resort to scripting?</p>