I am trying to get the title background of a site transparent but not the text within it:
#titlebackground {
     background-color: #333333;
     opacity: 0.5;
}
#title {
      font-family: Consolas, monaco, monospace;
      text-align: center;
      font-size: 9em;
      font-weight: 900;
      color: white;
      /*margin-top: -20%;*/
      display: inline-block;
      opacity: 1;
}
#titlelocation {
    position: relative;
}        <div id="titlelocation">
          <div id="titlebackground">
            <span id="title">My title</span>
          </div>
   </div>Setting the opacity of the span to 1 has no effect. How do I get the text to be fully seen but the background to be partially transparent?
 
    