div with opacity is affected by the color of the overlay behind it code example Example: background having opacity and text above to not have opacity background-color: rgba(255,0,0,0.6);