MoonLight MoonLight - 12 days ago 5
CSS Question

How to stretch background image of a table cell with CSS?

How can I stretch background image of a table cell with CSS? I have Googled it with no results.

When you set background image of a cell and the background size is smaller than the cell, then it will be repeated.

How can I force this background to stretch the entire table cell instead?

Answer

You can't stretch a background image.

If you want to stretch an image, you have to put it in an img tag. You can use absolute positioning to put content on top of the image.