<div class="slider">
  <div class="slide green">
    <p class="had"> I want to be green</p>
  </div>

  <div class="slide">
    <p class="had"> I`m ok</p>
  </div>

  <div class="slide red">
    <p class="had"> I want to be red</p>
  </div>
</div>

.slider{
  display: flex;
  justify-content: space-around;
  align-items:center
}

.slide{
  width: 200px;
  height: 200px;
  background-color: #333;
}
.slide.green{
  background-color: #76B900;
}
.slide.red{
  background-color: #F23C34;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.