With CSS you can repeat an image by using "repeat x" or "repeat y" so.. how do I stretch an image??? :confused:
CSS and Images
Started by Chan, Oct 18 2006 12:26 PM
5 replies to this topic
#1
Posted 18 October 2006 - 12:26 PM
|
|
|
#2
Posted 18 October 2006 - 08:18 PM
i'm not sure why you would want to, unless i'm not understanding you.. But you can resize image height and width like this:
<img src="image.gif" height="xxx" width="xxx" />
<img src="image.gif" height="xxx" width="xxx" />
#3
Guest_Jordan_*
Posted 19 October 2006 - 05:51 PM
Guest_Jordan_*
I think he means "stretch" as in stretch the image to fit the current spot whether it is too small or too large, correct?
#4
Posted 21 October 2006 - 05:41 AM
Exactly as brendan said, increase the image dimensions to whatever you want in the IMG tag, or set its height/width to 100% and change the size of the container
#5
Posted 21 October 2006 - 06:11 AM
If he only used height and width it would not stretch though. I think what you are looking for is:
<div style="width: 100%; height: 100%; left: 0px; top: 0px; position: absolute; z-index: 0;"> <img src="image.gif"> </div>
#6
Posted 26 October 2006 - 12:38 PM
Lop said:
If he only used height and width it would not stretch though. I think what you are looking for is:
<div style="width: 100%; height: 100%; left: 0px; top: 0px; position: absolute; z-index: 0;"> <img src="image.gif"> </div>
That wouldnt work, if you dont explicitly set the dimensions of the image it will default to its normal size, to stretch an image you set the width and height attributes in the IMG tag to the desired size, either px or %


Sign In
Create Account


Back to top









