Has anyone come across a problem where image is being distorted on a webpage?
Here is the simple CSS solution to display images without distorted.
Note: You need to remove the height and width attribute value from img tag itself.
Reference link http://forums.asp.net/p/1514562/3619288.aspx
Here is the simple CSS solution to display images without distorted.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
.imgresize {
width: 100px;
height: 150px;
}
.imgresize img {
width: 100px; // to fix images by width, or
// height: 150px; // to fix images by height
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="imgdiv" class="imgresize">
<img alt="" src="images/image01.gif" />
</div>
</div>
</form>
</body>
</html>
Note: You need to remove the height and width attribute value from img tag itself.
Reference link http://forums.asp.net/p/1514562/3619288.aspx