0

How can I put a div with text, logo or any more stuff on the center of this banner, like the example?

<div class="banner">     
  <img src="img/banner2.jpg" width="100%" alt="Nasajon Sistemas">
</div>

Example :

enter image description here

My Page

enter image description here

clinton3141
  • 4,751
  • 3
  • 33
  • 46
Tiago Silveira
  • 267
  • 4
  • 14

1 Answers1

0

Here there is an example you can fit to your needs:

.center{
  text-align:center;
  width:200px;   
  height:100px;
  background-color:red;
  position:absolute;
  top: 50%;
  left:50%;
  margin-left:-100px;
  margin-top:-50px;
}

.outter{
  width:100%;
  height: 500px;;
  background-color:black;
}


<div class="outter">

  <div class="center">
    <h1>Mywebsite</h1>
  </div>

</div>

https://jsfiddle.net/alexcuria/uunwbqyb/

user3187960
  • 295
  • 2
  • 14