stretchable image backgrounds?

liunx

Guest
looking for a way to make an image stretch insted of tiling. I am using the image as a background of a <td> linked trough a style sheet. and as the cell expands i would like the background image to streth insted of tiling. <br />
<br />
1. is this possible<br />
2. how do i do it<br />
<br />
<br />
thanks john<!--content-->Welcome to the forums.<br />
<br />
At this point in time, I don't believe that is possible. Maybe it will be in CSS3. We'll have to wait and see...<!--content-->Yes it is possible with DHTML or at least with a stretchable background image it is.<!--content-->Plus, images that get stretched can look less than impressive. Having a background image repeat isn't bad if when the image repeats it blends in a way that looks good.<!--content-->Originally posted by Robert Wellock <br />
Yes it is possible with DHTML or at least with a stretchable background image it is. Of course you could emulate it with JavaScript, however, I was referring to the use of pure CSS.<!--content-->there's no way that works well, but you could do an image in teh z-index (if it doesn't repeat) and set that to stretch<!--content-->but z-index is not supported by older browsers and you would have an image taking up the first half of your site and throwing it all out of whack.<!--content-->Even applying the 'CSS Z-Index' would most likely fail because CSS-2 doesn't have the capacity to physically stretch images for a background-image - it has the ability to repeat though - with regards to being applied to the body, because the <body> is the canvas in question and inline images are considered 'replaced elements' thus would move the text position.<br />
<br />
Out of interest: <!-- m --><a class="postlink" href="http://www.webreference.com/dhtml/diner/bgresize/">http://www.webreference.com/dhtml/diner/bgresize/</a><!-- m --><!--content-->What about attacking the problem from the other direction? Make the image extra large in the first place & force it to shrink to fit the table. Can that be done, or will the table just expand automatically to fit the image?<!--content-->extra large in the first place & force it to shrink to fit the table. <br />
<br />
that would be great but then you have problems with picture size. But anyways thanks for the help guys, the link was useful. I decided to just go around the problem and fix the image to repeat without looking like its repeating. When i get some web space i will send you a link to it. Looks pretty neat.<br />
<br />
thanks for all of your help <br />
john<!--content-->
 
Back
Top