Scott Scott - 5 months ago 30
CSS Question

Centering an <img> in a <td>

I'm trying to center an image within a table using CSS. Stackoverflow had others with the same problem and solved them using

margin:0 auto, text-align:center
, and/or
. None of these is forcing the
to be centered within my table cells.


your img tag is getting float:left property coming from style.css

on line no. 16, add float:none property td img {
    border: 1px solid black;
    display: block;
    margin: 0 auto;
    text-align: center;
    float: none; // give this property !