Best Best - 3 months ago 5x
CSS Question

Center image in table td in CSS

I've been trying to align an image to the center of the table td. It worked with setting margin-left to a specific value but it also increased the size of td too and that isn't exactly what I wanted

Is there any efficient ways of doing this? I used percentages for the height and witdh of the table.

<td align="center">

or via css, which is the preferred method any more...

<td style="text-align: center;">