title: How to put CSS card over background image
body: <p>I'm struggling with this CSS card, I want it over the background image, but I don't know how, I already tried positioning
  I accidentally placed the background image in the header, but I changed it to a div but it still doesn't work
  Can someone 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>* {
    margin: 0;
    padding: 0;
    font-family: 'Century Gothic';
  }
  
  img {
    width: 100%;
  }
  
  .header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(images/foto_beginpagina.jpg);
    height: 100vh;
    background-size: cover;
    background-position: center;
  }
  
  ul {
    float: right;
    list-style-type: none;
    margin-top: 25px;
  }
  
  ul li {
    display: inline-block;
  }
  
  ul li a {
    text-decoration: none;
    color: white;
    padding: 5px 20px;
    border: 1px solid white;
    transition: 0.6s ease;
  }
  
  ul li.huidig a {
    background-color: white;
    color: black;
  }
  
  ul li a:hover {
    background-color: white;
    color: black;
  }
  
  .head {
    margin-right: 25px;
  }
  
  .titel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  .titel h1 {
    color: white;
    font-size: 70px;
  }
  
  div.ondertitel h3 {
    color: white;
    padding-top: 20px;
    max-width: 600px;
    left: 50%;
  }
  
  .card {
    position: absolute;
    margin: 30px;
    padding: 10px;
    background: rgb(139, 119, 167);
    background: radial-gradient(circle, rgba(139, 119, 167, 1) 0%, rgba(139, 122, 140, 1) 100%);
    min-width: 400px;
    max-width: 400px;
    border: 2px solid black;
  }
  
  .card-title {
    padding: 30px;
  }
  
  .card-image img {
    border-radius: 20%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  
  &lt;body&gt;
    &lt;div class="header"&gt;
      &lt;div class="head"&gt;
        &lt;ul&gt;
          &lt;li&gt;&lt;a href="index.html"&gt;Home&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="geschiedenis.html"&gt;Geschiedenis&lt;/a&gt;&lt;/li&gt;
          &lt;li class="huidig"&gt;&lt;a href="rand.html"&gt;Randapparatuur&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="opbouw.html"&gt;Opbouw van de computer&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="card"&gt;
      &lt;div class="card-image"&gt;
        &lt;img src="images/randapparatuur.jpg" alt="Randapparatuur"&gt;
      &lt;/div&gt;
      &lt;h1 class="card-title"&gt;Randapparatuur&lt;/h1&gt;
      &lt;p class="card-text"&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. In facilisis tortor id erat pellentesque sodales. Nulla ut pharetra lacus, nec facilisis tortor. Morbi egestas, erat a tempus finibus, lectus sapien condimentum odio, ut pretium arcu magna sed
        leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Sed id placerat orci, vitae laoreet sem. Praesent nulla lacus, interdum quis maximus at, ultricies laoreet orci. Praesent tempus eros ac fringilla aliquam.
        Fusce pharetra, mi eget aliquam vulputate, massa justo mattis arcu, in dictum quam libero a elit. Aliquam erat volutpat. Fusce vestibulum tincidunt commodo. Duis non mattis nisl, non condimentum tellus. Sed commodo aliquet augue vel tincidunt. Nunc
        eleifend nisi scelerisque odio fringilla, vel aliquet nisl imperdiet. Nulla ligula justo, sollicitudin a mollis non, viverra id odio. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
      &lt;/p&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>ignore:
  Lorem ipsum dolor sit amet, consectetur adipiscing elit. In facilisis tortor id erat pellentesque sodales. Nulla ut pharetra lacus, nec facilisis tortor. Morbi egestas, erat a tempus finibus, lectus sapien condimentum odio, ut pretium arcu magna sed leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Sed id placerat orci, vitae laoreet sem. Praesent nulla lacus, interdum quis maximus at, ultricies laoreet orci. Praesent tempus eros ac fringilla aliquam. Fusce pharetra, mi eget aliquam vulputate, massa justo mattis arcu, in dictum quam libero a elit. Aliquam erat volutpat. Fusce vestibulum tincidunt commodo. Duis non mattis nisl, non condimentum tellus. Sed commodo aliquet augue vel tincidunt. Nunc eleifend nisi scelerisque odio fringilla, vel aliquet nisl imperdiet. Nulla ligula justo, sollicitudin a mollis non, viverra id odio. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas</p>