.button { background-image: url("http://www.exclusivefreegames.com/images/btn80x25.jpg"); width: 80; height: 25; valign: middle; } I want that image to stretch to fit a table cell. Can anyone please help? I want to use an image as a background for my buttons. It was working for a while but the size in CSS isn't applying to the td, so i figured my only course of action would be to stretch.
If you were going to stretch that image to fit the table cell, then I guess you'd have to set width: to the width of the cell not the img. However IMO that usually looks cheap, so you'd be best off designing a graphic to the exact size you want HTH
The better way to do this is to create a left and a right edge of the button and then create a filler image for the background. Use three TD's. Left side / center / Right side. Then the buttons will be fillled properly and won't look dorky from being stretched.