1

I want the page to look like the second image.I thought that with the overflow it would be enough to hide the rest of the image

This is the result:

enter image description here

This is what I want

enter image description here

.bgMentor{
 height: 100%;
 width: 100%;
 overflow:hidden;
 position:absolute;

  }
  
  .bgMentor img{
   min-width: 100%;
 min-height: 100%;
 position: absolute;
 top:50%;
 left: 50%;
 transform: translate(-50%,-50%);
 width: auto;
 height: auto;
  }
<div class="bgMentor">
       <img class="img-responsive" src="{{Storage::url('img/getamentor.png')}}"> 
      </div>
ViKiNG
  • 1,294
  • 2
  • 19
  • 26

2 Answers2

0

Try using overflow-y: hidden; instead of just overflow:;. If that doesn’t work, try putting the <Img> directly in the body and stylize it using a class=“bgMentor”.

dandemo
  • 397
  • 1
  • 5
0

Try adding a top and left value for your position: absolute element

.bgMentor{
    height: 100%;
    width: 100%;
    overflow:hidden;
    position:absolute;


    top: 0;
    left: 0;
  }
jas7457
  • 1,712
  • 13
  • 21