Log in

View Full Version : Header images modification


338Lapua
11-22-2014, 06:34 AM
I'm trying to fix the two trike images in my header on my forum that should be all on the same row, with it being - left image, tpc trikes banner, right image.

Here is my code for my header;

<!-- content table -->

$spacer_open



$_phpinclude_output



<!-- logo -->

<a name="top"></a>

<div id="header">

<div id="nav">

<ul>

<if condition="$show['member']">

<li><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></li>

</if>

<if condition="$show['registerbutton']">

<li><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></li>

</if>

<li><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></li>

<li><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></li>

<if condition="!$show['member']">

<li><a href="search.php?do=getdaily$session[sessionurl_q]">$vbphrase[todays_posts]</a></li>

</if>

<li id="navbar_search"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a>
<if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search", true); </script></if></li>

<if condition="$show['member']">

<li id="usercptools"><a href="$show[nojs_link]#usercptools" accesskey="3">$vbphrase[quick_links]</a> <script

type="text/javascript"> vbmenu_register("usercptools", true); </script></li>

<li><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out

('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></li>

</if>

</ul>

</div>


<table>
<tr>
<td align="left" >

<img height="96" src="http://www.tpctrikes.com/forum/images/IMG_1545.jpg" style="border-style: none" alt="" /></A>
<div style="clear:


</td><td align = "center">

<A HREF="http://www.tpctrikes.com"><center><img height="96" src="images/banner.jpg" style="border-style: none" alt="" /></center></A>
<div


</td><td align = "right">

<img height="96" src="http://www.tpctrikes.com/forum/images/TPC Air.jpg" style="border-style: none" alt="" /></A>

<!-- /logo -->


</td>
</tr>
</table>

<table cellspacing="0" cellpadding="0" border="0" width="100%">

<tr valign="top">

<td class="main_cell" style="padding: 10px $stylevar[spacersize]px">

$ad_location[ad_header_end]

Here is how it looks right now;

http://img.photobucket.com/albums/v641/GTO_Tiger/20141122_003130_zpsmysfsrxj.jpg

Thanks for helping me since I'm still learning vbulletin.

ForceHSS
11-22-2014, 07:09 AM
Can you put the above in code brackets

338Lapua
11-22-2014, 07:32 AM
Like I said before, I'm still learning vbulletin and coding.

What do you mean by putting it in code brackets?

Thanks.

Simon Lloyd
11-22-2014, 08:49 AM
Does that actually work? you have two malformed DIVs with no conclusion? you also have misplaced and malformed <a>'s

Replace all of<table>
<tr>
<td align="left" >

<img height="96" src="http://www.tpctrikes.com/forum/images/IMG_1545.jpg" style="border-style: none" alt="" /></A>
<div style="clear:


</td><td align = "center">

<A HREF="http://www.tpctrikes.com"><center><img height="96" src="images/banner.jpg" style="border-style: none" alt="" /></center></A>
<div


</td><td align = "right">

<img height="96" src="http://www.tpctrikes.com/forum/images/TPC Air.jpg" style="border-style: none" alt="" /></A>

<!-- /logo -->


</td>
</tr>
</table>
with this<table align = "center">
<tr>
<td>

<a href="http://www.tpctrikes.com" border="0"><img height="96" src="images/IMG_1545.jpg" style="border-style: none" alt="" />
<img height="96" src="images/banner.jpg" style="border-style: none" alt="" />
<img height="96" src="images/TPC Air.jpg" style="border-style: none" alt="" /></a>

<!-- /logo -->


</td>
</tr>
</table>but you'll have to add your css...etc for background, padding and whatever else to the containers. It's a good idea to include your alternative texts for the images before you add the code.

ForceHSS
11-22-2014, 10:06 AM
Like I said before, I'm still learning vbulletin and coding.

What do you mean by putting it in code brackets?

Thanks.
The way Simon has just done as it is easier to read

blind-eddie
11-22-2014, 03:37 PM
After you save a copy of your header template to have as a backup incase there is an issue, Replace your header template with the following:

You will have to edit your image width to fit the page...


<!-- content table -->

$spacer_open



$_phpinclude_output



<!-- logo -->

<a name="top"></a>

<div id="header">

<div id="nav">

<ul>

<if condition="$show['member']">

<li><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></li>

</if>

<if condition="$show['registerbutton']">

<li><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></li>

</if>

<li><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></li>

<li><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></li>

<if condition="!$show['member']">

<li><a href="search.php?do=getdaily$session[sessionurl_q]">$vbphrase[todays_posts]</a></li>

</if>

<li id="navbar_search"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a>
<if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search", true); </script></if></li>

<if condition="$show['member']">

<li id="usercptools"><a href="$show[nojs_link]#usercptools" accesskey="3">$vbphrase[quick_links]</a> <script

type="text/javascript"> vbmenu_register("usercptools", true); </script></li>

<li><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out

('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></li>

</if>

</ul>

</div>


<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="center">
<img height="96" src="http://www.tpctrikes.com/forum/images/IMG_1545.jpg" style="border-style: none" alt="" />
</td>
<td align="center">
<a href="http://www.tpctrikes.com" border="0"><img height="96" src="http://www.tpctrikes.com/forum/images/banner.jpg" style="border-style: none" alt="" />
</td>
<td align="center">
<img height="96" src="http://www.tpctrikes.com/forum/images/TPC Air.jpg" style="border-style: none" alt="" /></a>
</td></tr></table>

<!-- /logo -->


</td>
</tr>
</table>

<table cellspacing="0" cellpadding="0" border="0" width="100%">

<tr valign="top">

<td class="main_cell" style="padding: 10px $stylevar[spacersize]px">

$ad_location[ad_header_end]

338Lapua
11-22-2014, 03:48 PM
Thank you very much! I'm a Network Administrator and not a programmer. I'm still learning this stuff :-)

Simon Lloyd
11-23-2014, 04:40 AM
@blind-eddie it might be worth setting the table to Auto instead of 100% for fluidity (fluidity? is that a word? lol :))