PDA

View Full Version : How to make a banner in center in vbulletin theme ?


Naan-Kadavul
07-18-2010, 11:17 PM
How to make a banner in center in vbulletin theme ?

I want to make my banner align in the center instead of right/left side.

How can i do that ?

Here is my header 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="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td align="$stylevar[right]" id="header_right_cell">
<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else />&nbsp;</if>
</td>
</tr>
</table>
<!-- /logo -->


<!-- content table -->
$spacer_open

$_phpinclude_output

$ad_location[ad_header_end]


Someone Help with this issue.

Thanks,
NK

BirdOPrey5
07-19-2010, 12:24 AM
Try this:


<!-- 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="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
</tr><tr>
<td align="center" id="header_right_cell">
<if condition="$ad_location['ad_header_logo']"><div align="center"> $ad_location[ad_header_logo] </div><else />&nbsp;</if>
</td>
</tr>
</table>
<!-- /logo -->


<!-- content table -->
$spacer_open

$_phpinclude_output

$ad_location[ad_header_end]

Naan-Kadavul
07-19-2010, 01:41 AM
Yeah dude..it works..
check : www.moviejockey.com/forum

Thank you so much
NK

Naan-Kadavul
07-30-2010, 02:31 AM
Still in some of my friend's pc its showing the banner on the left hand side. why is it so ?

BirdOPrey5
07-30-2010, 07:10 AM
My bad... replace the <!--- logo --> code with this instead:


<!-- 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_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
</tr><tr>
<td align="center" id="header_right_cell">
<if condition="$ad_location['ad_header_logo']"><div align="center"> $ad_location[ad_header_logo] </div><else />&nbsp;</if>
</td>
</tr>
</table>
<!-- /logo -->


That should do it, I had left an align=left in there.

Avian321
08-03-2010, 03:34 AM
<!-- 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]"><center><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></center</a></td>
<td align="$stylevar[right]" id="header_right_cell">
<if condition="$ad_location['ad_header_logo']">$ad_location[ad_header_logo]<else />&nbsp;</if>
</td>
</tr>
</table>
<!-- /logo -->


<!-- content table -->
$spacer_open

$_phpinclude_output

$ad_location[ad_header_end]
Someone Help with this issue.

If you still have problems afterwards then try that code.

blind-eddie
08-03-2010, 04:51 AM
You are using IE browser? Those members may be using FF browser? I had this issue in the past, can't remember what I did to correct it...was to many edits ago

Naan-Kadavul
08-06-2010, 05:32 AM
I am using mozilla firefox only..is there any solutions to this..??

Cipher5
08-06-2010, 10:54 PM
I use this code for most my headers,
works in IE, fire fox and chrome, etc.



<!-- Header-->


<div align="center">

<table width="1200" border="0" cellpadding="0" cellspacing="0" class="border">

<td style="background-image:url($stylevar[imgdir_misc]/headerx.png); background-repeat:repeat-x;"><table width="1" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>

<td valign="top"><a href="index.php"><img src="$stylevar[imgdir_misc]/header.png" alt="" width="1200" height="300" border="0" /></a></td>

</tr>
</table>


<!-- Header End-->


This centers the header, and you can change this to your image name or from png to jpg or gif, etc change the sizes to fit your needs, hope this helps you. header should be placed in your skins misc dir.

Any questions visit CheykaWebDesign com

Ed

_____________________________________________
Need Affordable Hosting? Checkout CheykaWebDesign.com
• Unlimited Bandwidth, Unlimited Space, Mysql Databases, FTP Access, etc. www.CheykaWebDesign.com We can move and host your website for you! Contact Sales@CheykaWebDesign.com

Naan-Kadavul
08-06-2010, 11:24 PM
But, where to put the code actually ?? Please see my code in the previous post.

--------------- Added 1281140849 at 1281140849 ---------------

My bad... replace the <!--- logo --> code with this instead:


<!-- 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_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions" /></a></td>
</tr><tr>
<td align="center" id="header_right_cell">
<if condition="$ad_location['ad_header_logo']"><div align="center"> $ad_location[ad_header_logo] </div><else />&nbsp;</if>
</td>
</tr>
</table>
<!-- /logo -->


That should do it, I had left an align=left in there.

[B]
Works Superbly Perfect, Thanks Brother !!!!
Thanks to everyone who have helped me.. !!

Cipher5
08-07-2010, 03:49 AM
Paste this in your header template, and thats it. BTW what version vbulletin are you running?




<!-- Header-->


<div align="center">

<table width="1200" border="0" cellpadding="0" cellspacing="0" class="border">

<td style="background-image:url($stylevar[imgdir_misc]/headerx.png); background-repeat:repeat-x;"><table width="1" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>

<td valign="top"><a href="index.php"><img src="$stylevar[imgdir_misc]/header.png" alt="" width="1200" height="300" border="0" /></a></td>

</tr>
</table>


<!-- Header End-->


<!-- content table -->
$spacer_open

$_phpinclude_output

$ad_location[ad_header_end]

Naan-Kadavul
08-07-2010, 05:12 AM
I am using vb version 3.8.5

SamAndSam
08-07-2010, 08:01 AM
Hey sorry to kinda hijack your thread but will these codes work with VB4+?

Naan-Kadavul
08-08-2010, 03:03 AM
I think it will work..because its just a code to put the banner in center.

SamAndSam
08-08-2010, 10:10 PM
Btw where do I add this code to center the banner? Is it in style manager then edit template but which file is it in there?

Naan-Kadavul
08-08-2010, 11:46 PM
Go to admincp --- style manager --- choose the theme --- all styles -- under header
add the code.