vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=168)
-   -   Logo not centering (https://vborg.vbsupport.ru/showthread.php?t=288576)

Gophers 10-02-2012 10:28 PM

Logo not centering
 
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.

Code:

<!-- 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

1 Attachment(s)
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:

Code:

<!-- 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:

Code:

<!-- 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

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.


All times are GMT. The time now is 07:56 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01100 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete