PDA

View Full Version : Logo not centering


Gophers
10-02-2012, 10:28 PM
Ok, i having a werid problem on one of my site. the logo that i want to center is not centering at all.

Here is the code that i using, i rather not give out the site just yet as i am still working on it, but i can do so. if need to be. as you can see, i have the tr align center tag and i thought that would do it.

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="center"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>

<!-- /logo -->

Any code that would work for me to get the logo to center right.

Simon Lloyd
10-02-2012, 11:15 PM
When you say "Not centering" which cell in the header do you have it?, have you got a screenshot?

Gophers
10-02-2012, 11:20 PM
Here is a screenshot for you. the screenshot show it not really center as i went it to be. I like the logo to go full width of the forums. i mean is, i like it to go to the start of the navbar to the end of the navbar. not go all the way across.

Simon Lloyd
10-03-2012, 02:04 AM
Ok, somewhere there you'll find there's some margins or padding which is why it won't go plumb left and for the run off to the right just set the width less until it falls within the boundaries, but it looks like you may have some css thats causing it to do that.

EDIT: in fact i just logged on to your site and it looks perfectly centered?

Gophers
10-03-2012, 08:32 PM
Yeah i was fooling around with the width of the logo, i had to reset it back to the way it was.

Any how, here is my Margins i have set for the site.

margin: 10px 0px 10px 0px;
padding: 0px;

i've done everything to a T and nothing seem to work right. I don't want to resize my logo if i do not have too.

ShawneyJ
10-05-2012, 09:12 AM
i honestly would not be using the banner that way, i'd color a white border around the banner and adding back to the top in header template like default. this is what it would look like as default header template code:

EDIT: Image removed as asked ;)

adding the banner like that, the banner is free to rome.
but if you want to try and center it, replace your code with this and let me know if it works mate:

<!-- logo -->
<div style="margin-top:0px;margin-left:-25px;">
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="images/logo.png" border="0" alt="$vboptions[bbtitle]" /></a></td>

</tr>
</table>
</div>
<!-- /logo -->

you can add that code under $spacer_open in header template to if you want.

but again, id be using the default way like with the image attached to this post with the white color around it, just edit your PSD, put the white background, upload, then placing this code back to top of header template:

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="images/logo.png" border="0" alt="$vboptions[bbtitle]" /></a></td>

</tr>
</table>
<!-- /logo -->

good luck, hope it works. ;)

ps, let me know if you want attachment removed.
Chat Forums (http://www.chatforums.net)

Gophers
10-05-2012, 11:00 AM
Thank man, i did the first one and it work great. Thank again. You can remove the attachment.