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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.