EchoFool Posted January 6, 2009 Share Posted January 6, 2009 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? Quote Link to comment Share on other sites More sharing options...
htmlstig Posted January 7, 2009 Share Posted January 7, 2009 without using layers for each table you could use a css3 code background-size: 100%; but not all browsers are css3 compatible yet Quote Link to comment Share on other sites More sharing options...
TheFilmGod Posted January 7, 2009 Share Posted January 7, 2009 background: url(/med.jpg) repeat-x; Quote Link to comment Share on other sites More sharing options...
htmlstig Posted January 7, 2009 Share Posted January 7, 2009 background: url(/med.jpg) repeat-x; he said he doesnt want to repeat the image he wants it full size Quote Link to comment Share on other sites More sharing options...
MikeLibman Posted January 8, 2009 Share Posted January 8, 2009 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.