.pic1 {

  1. position: absolute;
  2. margin: auto;
  3. top: 0;
  4. bottom: 0;
  5. left: 0;
  6. right: 0;
  7. max-width: 100%;
  8. max-height: 100%;

}

<div class=”image”><img src=”img/rock.jpg” class=” pic1″ alt=””></div>

Posted in: css

Leave a Reply

Your email address will not be published.