Wednesday, October 29, 2014

How to make images responsive?

<style type="text/css">

 /*makes an image responsive*/
.responsive-image{
         
  display: block;
  height: auto;
  max-width:100%;
  width:100%;

}

</style>

<img class ='responsive-image' src =' http://www.google.com/images/srpr/logo11w.png'>

<!-- Now resize the browser to check whether its working or not -->


Output :)


No comments:

Post a Comment