Console

Position a text console with semi-transparent background

HTML

<!DOCTYPE html>
<html lang="en">

  <body>
    <div id="container">
    
      <div id="bg">
        background
      </div>
      
      <div id="text">
        content
      </div>
      
    </div>
  </body>

</html>

CSS

body {
  background-color: gray;
}

#container {
  width: 100%;
  height: 100vh;
  position: relative;
  box-sizing: border-box;
}

#bg,
#text {
  position: absolute;
  top: 150px;
  right: 50px;
  bottom: 50px;
  left: 50px;
}

#bg {
  background-color: red;
  opacity: 0.25;
  border: 1px solid blue;
  box-sizing: border-box;
}

#text {
  padding: 20px;
  overflow-y: hidden;
  color: greenyellow;
  border: 1px dashed;
  box-sizing: border-box;
}