2

I would like to put a logo in a transparent background black except that my logo becomes transparent now... it's a problem. I will wish my logo stays the same as before.

Do you have an idea please?

enter image description here

Here is my HTML

<div class="my-banner">
    <img class="banner" src="images/slider.jpg" alt="banniere">
    <div class="background-opacity">
      <img class="logo" src="images/logo.png" alt="logo" >
    </div>
  </div>

My CSS

.banner{
  height: 530px;
  width: 1366px;
  position: absolute;
}

.background-opacity{
  background-color: black;
  opacity: 0.5; 
  height: 100px;
  width: 1366px;
}

.logo{
  padding: 20px 0px 0px 35px;
}
anais_stemb
  • 103
  • 1
  • 10

1 Answers1

5

Use the following :

.background-opacity{
  background-color: rgba(0,0,0,0.5);
  opacity: 1; 
  height: 100px;
  width: 1366px;
}
CZ54
  • 5,488
  • 1
  • 24
  • 39