Stretch a <TABLE> background image to fill the entire cell

W

Water Cooler v2

I want to stretch the image so that it fills the entire cell width and
height. How do I do that?

<TD background="bg.gif" width="100%" height="100%">

So far I have done that but it doesn't seem to work. I think the height
and width get applied to the cell instead of the image. Is there a way
around this?
 
W

Water Cooler v2

I've also used the background-repeat style and set it to no-repeat. But
I want to stretch the image. Is there an HTML way to do it?
 
D

David Dorward

Water said:
I want to stretch the image so that it fills the entire cell width and
height. How do I do that?

Background images don't scale in current versions of CSS. Something might be
possible in CSS 3.

As a horrible hack it may be possible to scale a foreground image and use
z-index to position it behind content - but this tends to lead to nasty
results when CSS is unavailable.

Browsers suck at scaling images anyway.
 
W

Water Cooler v2

David said:
Background images don't scale in current versions of CSS. Something might be
possible in CSS 3.

As a horrible hack it may be possible to scale a foreground image and use
z-index to position it behind content - but this tends to lead to nasty
results when CSS is unavailable.

Browsers suck at scaling images anyway.



Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top