Skip to content Skip to sidebar Skip to footer

Text Over Image - Responsive

this is my first question soo... i have to do someting like this: but i search a lot and nothing work for me, i had something like this in my html and css that work, but when i u

Solution 1:

img {
    display: block;
}

.thumbnail {
    position: relative;
    display: inline-block;
}

.caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate( -50%, -50% );
    text-align: center;
    color: white;
    font-weight: bold;
}
<div id="box-search">
      <div class="thumbnail">
          <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Granola03242006.JPG/280px-Granola03242006.JPG" alt="">
          <div class="caption">
              <p>contacto@windberg.cl</p>
              <p>+56983874071   |   +56228231294</p>
              <p>El Aguilucho 3174, Providencia, RegiĆ³n Metropolitana</p>
          </div>
      </div>
  </div>

Post a Comment for "Text Over Image - Responsive"