Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Help with Centering an Image in a Table

Help with Centering an Image in a Table

Views: 421

Results 1 to 7 of 7
5 Jun 2012, 8:35 AM
#1
daphne avatar

daphne

New Zenner

Join Date:
Nov 2009
Posts:
15
Plugin Contributions:
0

Help with Centering an Image in a Table

Hi,

Is there a simple way to center images in a table? I have a table that has images on it that I want to center. I also want to center the table itself. I had it set up the way that I wanted it to look, but I got errors when I went to validate it. Suggestions?

http://photothrowsandmore.com/index.php?main_page=page_2&zenid=858877189ad89ea518c61cc00f495490

I've tried working with the firebug extension, but haven't gotten anywhere with it yet. I was able to get the images to center by changing the stylesheet, but everything else got centered as well.

Thanks

5 Jun 2012, 8:54 AM
#2
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Help with Centering an Image in a Table

I get directed to the Down for Maintenance page

Are you referring to the Down for Maintenance (Image)?

5 Jun 2012, 4:25 PM
#4
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Help with Centering an Image in a Table

easiest way would be to add the following to your code in the defines page editor

<td align="center" valign="middle"> IMAGE </td>

your table itself appears centered in my browser

to make both columns the same width add

<td align="center" valign="middle" width="50%">IMAGE </td>

hope this helps

5 Jun 2012, 4:28 PM
#5
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Help with Centering an Image in a Table

or you could give each tr & td a unique id so you could further style them via your stylesheet

5 Jun 2012, 7:20 PM
#6
daphne avatar

daphne

New Zenner

Join Date:
Nov 2009
Posts:
15
Plugin Contributions:
0

Re: Help with Centering an Image in a Table

Thanks so much!!! I went with the first suggestion until I can figure out CSS.

6 Jun 2012, 2:21 PM
#7
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: Help with Centering an Image in a Table

glad this worked for you :-)