# background image getting padded in table when all I want to pad is the text



## cutcopypaste (Jul 28, 2007)

I have a table and several of the cells have background images. I want to have the text a little in from the table lines, but if I add padding it moves in the background image as well. Is there a simple way to get around this?

Thanks!


----------



## amanxman (Mar 28, 2006)

Are you adding cellpadding? or cellspacing? Background images also get moved when using a margin instead of padding. Ensure you are using padding, not margin.

Ideally you want to be adding padding to the text through css.

If you are using css, you can do this via:

p
{
padding: 10px 10px 10px 10px;
}

The above will give all instances of p (i.e. paragraph) a padding of 10px all the way around. You can change these as required (it goes top, right, bottom, left).

If this doesn't help, please can you post your code, or a URL

Cheers


----------

