Jump to content

background fill cell


EchoFool

Recommended Posts

I have a table with a couple of <td>'s which have a image background.

 

But the image is smaller than the cell. But i have repeat image to no because it doesn't look right but i need this image to fill the whole cell so as such "stretch" to fill the cell.

 

But i got no idea how to do it... so far i have:

 

<td style="background-image: url('/med.jpg'); background-repeat:no-repeat; width: 90px; height: 50px;">

 

Although width and height changes the td size it doesnt change the size of the background image aswell which is what i need it to do ... how can this be done?

Link to comment
https://forums.phpfreaks.com/topic/139691-background-fill-cell/
Share on other sites

I have a table with a couple of <td>'s which have a image background.

 

But the image is smaller than the cell. But i have repeat image to no because it doesn't look right but i need this image to fill the whole cell so as such "stretch" to fill the cell.

 

But i got no idea how to do it... so far i have:

 

<td style="background-image: url('/med.jpg'); background-repeat:no-repeat; width: 90px; height: 50px;">

 

Although width and height changes the td size it doesnt change the size of the background image aswell which is what i need it to do ... how can this be done?

 

Try using CSS or all your images and style... after all that's what it's for and not to mention it makes the HTML much cleaner.

Link to comment
https://forums.phpfreaks.com/topic/139691-background-fill-cell/#findComment-732257
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.