CodePen

HTML

            
              <div class="mobile-screen-viewport">
  <img id="image1" src="http://www.tonyjacobson.com/napawapa/gallery/images/01.jpg"  alt="wine image"/>
</div>
            
          
!

CSS

            
              .mobile-screen-viewport {
  position: relative;
  width: 320px;
  height: 548px;
  background-color: red;
}

#image1 {
  height: 100%;
  position: absolute;
  top: 0px;
  left: 50%;
  -webkit-transform: translate(-50%, 0);
}


            
          
!
? ?
? ?
Must be a valid URL.
+ add another resource
via CSS Lint

JS

            
              
            
          
!
Must be a valid URL.
+ add another resource
via JS Hint
Loading ..................