phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Logo in the centre


 
Search this topic... | Search General Support... | Search Box
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Author Message
macd
Board Member



Joined: 08 Apr 2019

Posts: 6



PostPosted: Sun Sep 01, 2019 10:30 am 
Post subject: Logo in the centre

So, how do I get the header logo to centralise, rather than being pinned to the left? I've tried align="center" all over the place in overall_header.tpl but it just doesn;t work!
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 687
Location: Texas


flag
PostPosted: Sun Sep 01, 2019 1:18 pm 
Post subject: Re: Logo in the centre

Are you using the standard subSilver or some other template?

If I remember, subSilver uses tables to align / position items. Aligning center is going to align within the table area, not over the total page space.

_________________
phpBBDoctor Blog
Back to top
macd
Board Member



Joined: 08 Apr 2019

Posts: 6



PostPosted: Sun Sep 01, 2019 1:25 pm 
Post subject: Re: Logo in the centre

drathbun wrote:
Are you using the standard subSilver or some other template?

If I remember, subSilver uses tables to align / position items. Aligning center is going to align within the table area, not over the total page space.


Yep, subsilver.
Back to top
Salvatos
Board Member



Joined: 19 Feb 2009

Posts: 439
Location: Qu├ębec


flag
PostPosted: Sun Sep 01, 2019 4:34 pm 
Post subject: Re: Logo in the centre

Drathbun is correct. The logo is alone in its table cell, and the cell to the right uses as much space as it can and holds the navigation. So even if you try to center the logo with styling, it can only take up as much space as it absolutely needs and gets pushed to the left by the rest of the table row. The easiest solution would probably be to give it its own row. It looks like this should work:

REPLACE
Code:
      <td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
         <tr>
            <td><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
            <td align="center" width="100%" valign="middle"><span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}<br />&nbsp; </span>

WITH
Code:
      <td class="bodyline"><table width="100%" cellspacing="0" cellpadding="0" border="0">
         <tr>
            <td align="center"><a href="{U_INDEX}"><img src="templates/subSilver/images/logo_phpBB.gif" border="0" alt="{L_INDEX}" vspace="1" /></a></td>
         </tr>
         <tr>
            <td align="center" width="100%" valign="middle"><span class="maintitle">{SITENAME}</span><br /><span class="gen">{SITE_DESCRIPTION}<br />&nbsp; </span>


Boy, it feels dirty to do layout like this after all these years icon_smile.gif
Back to top
Vendethiel
Board Member



Joined: 26 Oct 2014

Posts: 162



PostPosted: Mon Sep 02, 2019 9:48 am 
Post subject: Re: Logo in the centre

There's nothing quite like tables... hahaha...
_________________
Developer on EzArena, the ADR premod.
Developer on Icy Phoenix, the phpBB hybrid cms.
Developer on IntegraMOD, the full-featured premod.
Help me archive premods on github! (fixed for recent PHPs).
Back to top
macd
Board Member



Joined: 08 Apr 2019

Posts: 6



PostPosted: Thu Sep 05, 2019 7:22 am 
Post subject: Re: Logo in the centre

Thanks for your replies guys icon_smile.gif
Back to top
Display posts from previous:   
Register or Login to Post    Index » General Support  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0280 seconds using 15 queries. (SQL 0.0027 Parse 0.0013 Other 0.0240)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo