I know this isn't a Drupal Forum, but i'm hoping someone here can help me with a CSS issue. It's probably an easy fix, but I am completely new to CSS, and basically Drupal as well.

I used a tutorial to create an image gallery...and it looks fine, except for a few things.

How do I center rows of images inside of the border (instead of all being left-justified)?
How do I center an individual image within a row (that happens to be portrait, and contains more border space than most of the images, which are landscape)?

This is the small bit of PHP I am using:


/* change the column count to the number of photos you want to appear going across. (Adjust thumbnail size as needed) */
$columns = 2;
$rows = array_chunk($items, $columns);

<table class="mini-gallery">
<?php foreach ($rows as $row_number => $columns): ?>
$row_class = 'row-' . ($row_number + 1);
if ($row_number == 0) {
$row_class .= ' row-first';
if (count($rows) == ($row_number + 1)) {
$row_class .= ' row-last';
<tr class="<?php print $row_class; ?>">
<?php foreach ($columns as $column_number => $item): ?>
<td class="<?php print 'col-'. ($column_number + 1); ?>">

<?php endforeach; ?>
<?php endforeach; ?>

Thanks in advance!