title: Center a DIV horizontally and vertically without fixed height
body: <p>I want the content to be centered vertically and horizontally but it gets centered only horizontally. The problem is that I don't have fixed height.
  Thank you guys for help!</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>html,
  body {
    height: 100% margin: 0;
    overflow: hidden;
  }
  .content {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    text-align: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="content"&gt;
    &lt;h1&gt;Welcome to the website!&lt;/h1&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>