[SOLVED] Changing vertical alignment of thumbnails

chase926

Joined: 2009-10-20
Posts: 8
Posted: Thu, 2009-10-22 22:11

I'm trying to alter the vertical alignment of the thumbnails on my main page:

http://www.melroselumberandhardware.com/gallery/main.php

I'm using the PG Theme.

The default setting is obviously to have the thumbs top aligned, while I'd like them to be bottom aligned so that all the bottom edges and captions line up. (All my captions will be one line.)

I read a much older post that referenced changing the valign=top code in the album.tpl to bottom in several places in the area around line 545. I've done that and cleared the template cache, but nothing changed.

Here's the section, including the changed code:

<td valign="bottom">
{assign var="childrenInColumnCount" value=0}
<div class="gbBlock">
<table id="gsThumbMatrix" width="100%">
<tr valign="bottom">
{foreach from=$theme.children item=child}
{* Move to a new row *}
{if empty($theme.parents)}
{if ($childrenInColumnCount == $theme.params.columns1st)}
</tr>
<tr valign="bottom">
{assign var="childrenInColumnCount" value=0}
{/if}
{assign var="nome" value=$child.id}
{assign var="Toff" value=$theme.params.opacityT}
{assign var="Tover" value=$theme.params.opacityTover}
{assign var=childrenInColumnCount value="`$childrenInColumnCount+1`"}

<td style="width: {$theme.columnWidthPct}%" class="{if $child.canContainChildren}giAlbumCell {else}giItemCell{/if}">
{if ($child.canContainChildren || $child.entityType == 'GalleryLinkItem')}
{assign var=frameType value="albumFrame"}
{else}
{assign var=frameType value="itemFrame"}
{/if}
<br/><br/><br/>
{else}
{if ($childrenInColumnCount == $theme.params.columns)}
</tr>
<tr valign="bottom">
{assign var="childrenInColumnCount" value=0}
{/if}

Any suggestions on where to go from here?

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16501
Posted: Fri, 2009-10-23 17:54

Install Firefox with the Firebug extension :) I found this in 5 seconds :)

In your theme.css, around line 156, change:

td.giAlbumCell, td.giItemCell {
  padding: 0.8em;
  text-align: center;
  vertical-align: top;
}

to:

td.giAlbumCell, td.giItemCell {
  padding: 0.8em;
  text-align: center;
  vertical-align: bottom;
}

____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

 
chase926

Joined: 2009-10-20
Posts: 8
Posted: Fri, 2009-10-23 18:26

Fantastic! Worked like a charm!

Thanks so much--I never would have found the right code.