title: Remove div border element for title space
body: <p>I am trying to achieve this effect below:</p>
  <p><a href="https://i.stack.imgur.com/x6mcZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x6mcZ.png" alt="enter image description here" /></a></p>
  <p>How can I get this effect? I want the empty space to adjust to the text. Can anyone give me advice?
  <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>.box {
    border: 1px solid black;
    position: relative;
    min-height: 50px;
  }
  
  .box__title {
    position: absolute;
    bottom: 16px;
    left: 30px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="box"&gt;
  &lt;h2 class="box__title"&gt;Box title&lt;/h2&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>