Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

271
Vistas
How to make background image of full height

<div class="col-lg-12 text-center">
             <div class="for-video-background" style="background-image: url('./assets/images/back-video.png');">
               <a href="#">
                  <img src="./assets/images/play-icon.png" alt="" class="img-fluid" style="width: 5rem;">
               </a>
             </div>
          </div>

I want the background image to take full height and the sub-image must align the center of the background image. And at last it must be responsive.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You have to use "height:100vh"

<div class="col-lg-12 text-center">
  <div class="for-video-background" style="background-image: url('./assets/images/back-video.png');">
     <a href="#">
        <img src="./assets/images/play-icon.png" alt="" class="img-fluid" style="width: 5rem;height: 100vh">
     </a>
  </div>
</div>
about 4 years ago · Juan Pablo Isaza Denunciar

0

Use width:100vh to make full height and use left and right make the image become center.

Use the background-size: cover to resize the background image to cover the entire container.

<div class="col-lg-12 text-center">
    <div class="for-video-background" >
               <a href="#">
                  <img src="./assets/images/play-icon.png" alt="" class="img-fluid" >
               </a>
             </div>
          </div>

CSS:

body{
    margin: 0;
}
img{
    width:5rem;
    position: absolute;
    left: 47.5%;
    top: 47.5%;

}
.for-video-background{
    height: 100vh;
     background-size: cover;
    background-image: url('./assets/images/back-video.png')
}
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda