Center Text in the gbBlockTop of album.tpl

kobitriki

Joined: 2008-10-29
Posts: 21
Posted: Tue, 2008-12-30 11:17

Hello!

I am using Gecko theme on my Gallery2.

I want to add a small script to display a rolling link on the "gbBlockTop", next to the sidebar show icon.

i can add the script but, i cant find how to align the script only to center of the "gbBlockTop" and keep the icon of the sidebar aligned to the left.
the script i used is:

Quote:
<td align="center">
<script language='JavaScript'>
BLA BLA BLA
</script>
</td>

the code of album.tpl is:

Quote:
<table class="gcBackground3" width="800" cellspacing="0" cellpadding="0" align="center">
<tr valign="top">
<td>
<div id="gsContent" class="gcBorder1">
<div class="gbBlockTop">
<table>
<tr>
<td class="gsActionIcon">
<div class="buttonShowSidebar"><a href="javascript: slideIn('sidebar')" title="Show Menu"></a></div>
</td>

******* I PUT MY CODE HERE - WORKS FINE, BUT NOT CENTERED *****

{if (isset($links) || isset($theme.itemLinks))}
{if !isset($links)}{assign var="links" value=$theme.itemLinks}{/if}

{foreach from=$links item=link}
{if $link.moduleId == "cart"}
<td class="gsActionIcon">
<div class="buttonCart"><a href="{g->url params=$link.params}" title="{$link.text}"></a></div>
</td>
{elseif $link.moduleId == "comment"}
{if $link.params.view == "comment.AddComment" }
<td class="gsActionIcon">
<div class="buttonAddComment"><a href="{g->url params=$link.params}" title="{$link.text}"></a></div>
</td>
{elseif $link.params.view == "comment.ShowAllComments"}
<td class="gsActionIcon">
<div class="buttonViewComments"><a href="{g->url params=$link.params}" title="{$link.text}"></a></div>
</td>
{/if}
{elseif $link.moduleId == "slideshow"}
<td class="gsActionIcon">
<div class="buttonViewSlideshow"><a href="{g->url params=$link.params}" title="{$link.text}"></a></div>
</td>
{/if}
{/foreach}
{/if}
</tr>
</table>
</div>

can anyone guide me how can i solve it?

Thanks
Kobi

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25957
Posted: Tue, 2008-12-30 14:37

I guess you could wrap you code in another table cell and center that. Hard to tell without an example url.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
kobitriki

Joined: 2008-10-29
Posts: 21
Posted: Wed, 2008-12-31 12:45

Hey, floridave,
sorry for not mention the site, freehdphoto dot com

Thanks
Kobi