title: CSS making div appear to grow up when hovering over a character next to it
body: <p>I can't figure out how to make the blue square appear to grow up (by increasing the padding on top) when hovering over the character on the left, i tried increasing the padding-top but it shifts the position of the square down making it seem like it is growing down instead of growing up, i have tried various things but i can't seem to make it grow up.</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>:root {--font-size: 16px;}
  * {list-style-type: none;}
  html {font-size: var(--font-size);}
  
  ul {
      display: flex;
      flex-direction: row;
      justify-content: center;
      align-items: center;
      font-size: 1.25em;
      min-height: 10em;
  }
  
  li {
      position: relative;
      display: flex;
      align-items: center;
      color: black;
      margin-inline: 1em;
      height: 10em;
  }
  
  .h {
      position: absolute;
      top: 4.5em;
      left: 1em;
      background-color: blue;
      width: 1em;
      height: 1em; 
  }
  
  h2:hover + .h {
      padding-top: 1em;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;body&gt;
      &lt;nav&gt;
        &lt;ul&gt;
          &lt;li&gt;
            &lt;h2&gt;A&lt;/h2&gt;
            &lt;div class="h"&gt;&lt;/div&gt;
        &lt;/ul&gt;
      &lt;/nav&gt;
  &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>