How to auto-resize an image to fit a div element
When an image is added to the HTML page, it may not be positioned correctly inside of the parent container. For example, the most common case is when the image is larger than the DIV element. As a result, you may see other regular content overlapped by the picture data. Or even worse, in some …