"Help me if you can, im..."

liunx

Guest
Hi everyone,<br />
<br />
wondering if anyone can help me,<br />
<br />
In HTML is there any way that when you resize the image in html, ie Height="*" width="*" so that it crops the image instead of stretchin/shrinking it?<br />
<br />
I hope this is an easy question.<br />
<br />
Thanks in advance<br />
<br />
Alex<!--content-->You cannot do it with just HTML but it can be done with a little CSS.<br />
Try this...<br />
<html><head><title>Untitled</title><br />
<style type="text/css"><br />
.imgClip { position:absolute; clip:rect(20 100 100 20) }<br />
/* clip:rect(top,right,bot,left) */<br />
</style><br />
</head><br />
<body bgcolor="#ffffff><br />
<img src=http://www.webdeveloper.com/forum/archive/index.php/"sample4.jpg" class="imgClip"><br />
</body><br />
</html><br />
<br />
Note: The image must use position:absolute for thsi to work.<!--content-->
 
Back
Top