Click to See Complete Forum and Search --> : Center image within <td>


nnhubbard
05-20-2008, 03:58 PM
I am not a css novice, but I am stuck.

I have an image gallery of thumbs, and they are mixed vertical and horizontal, so I am having to use a table. Within each <td> I want to horz. center the image. So, I am trying what normally does the trick, but for some reason it is not, am I missing something here?

<table id="galTable>
<tr>
<td><img src="#" alt="blah" /></td>
</tr>
</table>

table#galTable tr td img {display:block; margin: 0 auto;}

ryanbutler
05-20-2008, 04:28 PM
Unless it's because you're missing a double quote on the ID of the table itself. Other than that, we'd need to see a page.

nnhubbard
05-20-2008, 04:55 PM
Unless it's because you're missing a double quote on the ID of the table itself. Other than that, we'd need to see a page.

No, it is not that. I just typed up that example for the post.

I figured it out. I had a style overriding it that was floating the images.