Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

269
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!