View Full Version : how to stretch a css background image height ways

11-16-2008, 12:11 PM
below is the code i am using at the moment for my menu buttons

but now i have buttons that need two lines to display the menu items name.

so need to have the height of button be automatic to the content of the TD it is in.

to have the image stretch to the full height of the TD

how would i do this?

td.menubutton{ background: url(images/menubutton.gif); background-repeat: no-repeat; background-position: center center; text-align: center; }

11-16-2008, 01:22 PM
Sorry, I didn't know what you were talking about. Disregard this post. I thought you meant bg image of body.

11-16-2008, 05:47 PM
Afaik, not possible for background images.

Just Make the image taller in photoshop.


Major Payne
11-18-2008, 04:16 AM
Might see if you can get these to work using the CSS code for the body to stretch background image full page. It only works with a 100% x 100% html/body so probably can't apply it the way you want: http://www.cssplay.co.uk/layouts/background Be glad when browser implement CSS3 where this property will be supported for background images.