border of image take the size of div code example Example: border of image take the size of div max-width:100%; max-height:100%;