Little error in index.template.php

Started by John, November 29, 2005, 07:57:25 AM

Previous topic - Next topic

John

HI guys,

I tried it all, accept the wright one  :o Somehow the menu is a bit higher placed then the bodyarea.

The code i used in the index.template.php is this:

// The main content should go here.  A table is used because IE 6 just can't handle a div.
   echo '
   <table width="99%" align="center" cellpadding="0" cellspacing="0" border="0"><tr>
      <td width="19%">
<tr>
<td width="20%" align="center" valign="top">
<table border="0" width="20%" cellspacing="0" cellpadding="0">
<tr><td><img src="/pics/ltop.gif" height=15 align="left"><img src="/pics/recht.gif" width=145 height=15><img src="/pics/rtop.gif" height=15></td>
</tr>

<tr>
<td bgcolor="#393837">

<img src="/pics/navi.jpg">
<a href="http://eaclan.nl/index.php">Home</a><br />
<a href="http://eaclan.nl/index.php?action=login">Login</a><br />
<a href="http://eaclan.nl/index.php?action=register">Register</a><br />

<a href="http://eaclan.nl/index.php?action=forum">Forum</a><br />
<a href="http://eaclan.nl/index.php?topic=65.0">Posting rules</a><br />
<a href="http://eaclan.nl/index.php?topic=67.0">Contact</a><br />

<img src="/pics/com.jpg">
<a href="http://eaclan.nl/index.php?topic=63.0">About us</a><br />
<a href="http://eaclan.nl/index.php?action=static&staticpage=3">BFME clan team</a><br />
<a href="http://eaclan.nl/index.php?action=static&staticpage=4">ALPHA practice clan</a><br />
<a href="http://eaclan.nl/index.php?action=static&staticpage=1">Join the 5TH</a><br />
<a href="http://eaclan.nl/index.php?board=19.0">Replays</a><br />
<a href="http://eaclan.nl/index.php?action=static&staticpage=2">Challenge us</a><br />
<a href="http://eaclan.nl/index.php?action=mlist">All members</a><br />
<a href="http://eaclan.nl/index.php?board=28.0">Latest news</a><br />

<img src="/pics/twee.jpg">
<a href="http://eaclan.nl/index.php?action=static&staticpage=5">Official FAQ</a><br />
<a href="http://eaclan.nl/index.php?board=18.0">BFME 2 news</a><br />
<a href="http://eaclan.nl/index.php?board=18.0">Trailers and videos</a><br />

<img src="/pics/recent.jpg">';
include('./Blocks/PortalRecentPosts.php');

PortalRecentPosts();
echo '</td>
</tr></table>


<td id="bodyarea" width="79%" align="center" valign="top" style="padding: 1ex 0px 2ex 0px;">';

I dont understand why both parts are placed with different heights. Also i want to know how i should restore some include parts in this. Every time when i try this i get errors    :'(

Can someone help me with this nightmare?

BTW my site is at http://eaclan.nl ( i just started)

rakuli


<table width="99%" align="center" cellpadding="0" cellspacing="0" border="0"><tr>
    <td width="20%" align="center" valign="top">
<table border="0" width="20%" cellspacing="0" cellpadding="0">
<tr><td><img src="/pics/ltop.gif" height=15 align="left"><img src="/pics/recht.gif" width=145 height=15><img src="/pics/rtop.gif" height=15></td>
</tr>

<tr>
<td bgcolor="#393837">

<img src="/pics/navi.jpg">
<a href="http://eaclan.nl/index.php">Home</a><br />
<a href="http://eaclan.nl/index.php?action=login">Login</a><br />
<a href="http://eaclan.nl/index.php?action=register">Register</a><br />

<a href="http://eaclan.nl/index.php?action=forum">Forum</a><br />
<a href="http://eaclan.nl/index.php?topic=65.0">Posting rules</a><br />
<a href="http://eaclan.nl/index.php?topic=67.0">Contact</a><br />

<img src="/pics/com.jpg">
<a href="http://eaclan.nl/index.php?topic=63.0">About us</a><br />
<a href="http://eaclan.nl/index.php?action=static&staticpage=3">BFME clan team</a><br />
<a href="http://eaclan.nl/index.php?action=static&staticpage=4">ALPHA practice clan</a><br />
<a href="http://eaclan.nl/index.php?action=static&staticpage=1">Join the 5TH</a><br />
<a href="http://eaclan.nl/index.php?board=19.0">Replays</a><br />
<a href="http://eaclan.nl/index.php?action=static&staticpage=2">Challenge us</a><br />
<a href="http://eaclan.nl/index.php?action=mlist">All members</a><br />
<a href="http://eaclan.nl/index.php?board=28.0">Latest news</a><br />

<img src="/pics/twee.jpg">
<a href="http://eaclan.nl/index.php?action=static&staticpage=5">Official FAQ</a><br />
<a href="http://eaclan.nl/index.php?board=18.0">BFME 2 news</a><br />
<a href="http://eaclan.nl/index.php?board=18.0">Trailers and videos</a><br />

<img src="/pics/recent.jpg">';
include('./Blocks/PortalRecentPosts.php');

PortalRecentPosts();
echo '</td>
</tr></table>


<td id="bodyarea" width="79%" align="center" valign="top" style="padding: 1ex 0px 2ex 0px;">';


Try this, you had the first <td width="19%"> was followed directly by <tr>, if you remove both of these it should level.

By having the above line in there, the browser is treating it as a shorthand <td></td></tr><tr>.

John

Thank you for the fast response, i appreciate it, but your solution doesnt help.

The problem is in here:

<img src="/pics/twee.jpg">
<a href="http://eaclan.nl/index.php?action=static&staticpage=5">Official FAQ</a><br />
<a href="http://eaclan.nl/index.php?board=18.0">BFME 2 news</a><br />
<a href="http://eaclan.nl/index.php?board=18.0">Trailers and videos</a><br />

<img src="/pics/recent.jpg">';
include('./Blocks/PortalRecentPosts.php');
PortalRecentPosts();

echo '</td>
</tr></table>


<td id="bodyarea" width="79%" align="center" valign="top" style="padding: 1ex 0px 2ex 0px;">';

}

function template_main_below()
{
   global $context, $settings, $options, $scripturl, $txt;



As you can see it ends the table, in red, and then it plops out a new <td> with the bodyarea, wich is the reason the news part is posted a line below.
My problem is how can i get both parts on the same line? I tried posting the bodyarea in the table structure but then only errors come out.

Plz help

Advertisement: