<body class="card">
  <div id="qa">
    
    <!-- Start of template -->
    <div class="kard">
      <div class="textbox">{{Front}}</div>
      <hr id="answer">
      <div class="textbox">{{Back}}</div>
    </div>
    <!-- End of template -->
    
  </div>
</body>
/* center #qa inside .card (the body)  */
.card {
  font-size: 1.2rem;
  text-align: center;
  background-color: #8ab0ae;
  --text-fg: #575e6f;
  --text-bg: rgba(255, 255, 255, .5);
  --kard-bg: #fed6bc;
}

/* make #qa (child of .card) centerable */
/* and left-aligned */
#qa {
  min-width: 100%;
  display: inline-block;
}

.kard {
  padding: 1.5rem 1rem;
  background: var(--kard-bg);
  box-shadow: rgba(0, 0, 0, 0.30) 0px 0px 25px 4px;
  border-radius: 15px;
}

.textbox {
  display: inline-block;
  text-align: left;
  color: var(--text-fg);
  text-shadow: 0.1rem 0.1rem 0 var(--text-bg);
}

hr#answer {
  margin-top: 1rem;
  margin-bottom: 1rem;
  border: 0;
  height: 0;
  border-top: thin solid rgba(0, 0, 0, 0.2);
  border-bottom: thin solid rgba(255, 255, 255, 0.3);
}

/* for landscape orientation */
/* only use part of the available width */

@media (min-width: 992px) {
  #qa {
    min-width: 60%;
    max-width: 80%;
  }
}
@media (min-width: 1366px) {
  #qa {
    min-width: 40%;
    max-width: 66%;
  }
}
Run Pen

External CSS

  1. https://codepen.io/kleinerpirat/pen/JjOEmdR.css

External JavaScript

This Pen doesn't use any external JavaScript resources.