Underlig menu
Ok, drenge...Jeg har en menu (den bliver kaldt via PHP, men layoutet er normal HTML kode), der opfører sig en smule underligt. Den består af <td>´er og billeder, med noget onmouseover-effekter på. Problemet er at der imellem de enkelte billeder (eller måske er det <td>) opstår et tomrum, hvor der ikke er noget... kun hvid baggrund.
Jeg har forsøgt mig med at ændre width på elementerne, jeg har forsøgt align="left" på dem... no luck. Er der nogen, der måske kan hjælpe?
*** KODE ***
function draw_menu () {
$return_string = "<table width='756' bgcolor='#66bf2c' cellspacing='0' cellpadding='0' >
<tr>
<td rowspan='2' width='402'><img imc='images/graphics/topNav_igLogo.gif' alt='' height='60' width='396' border='0' /></td>
<td colspan='4'><img src='images/graphics/topNav_celLogo.gif' alt='' height='36' width='252' align='right' border='0' /></td>
<td rowspan='2' width='36'><img src='images/graphics/blank.gif' height='4' width='36' align='right'/></td>
</tr>
<tr>
<td width='108'><img src='images/graphics/blank.gif' height='1' width='108' border='0' /></td>";
$page_type = get_filename($_SERVER['PHP_SELF']);
$welcome_page = "welcome.php";
switch ($page_type)
{
case "contact":
$return_string .= "<td width='102'><img src='images/graphics/blank.gif' height='24' width='105' border='0' /></td>
<td width='51'><a href='contact.php'><img id='topNav_but_contact' src='images/buttons/topNav_but_contact_over.gif' alt='' name='topNav_but_contact' height='24' width='54' border='0' /></a></td>
<td><a onmouseover=\"changeImages('topNav_but_logout','images/buttons/topNav_but_logout_over.gif');return true\" onmouseout=\"changeImages('topNav_but_logout','images/buttons/topNav_but_logout.gif');return true\" href='logout.php'><img id='topNav_but_logout' src='images/buttons/topNav_but_logout.gif' alt='' name='topNav_but_logout' height='24' width='48' border='0' /></a></td>";
break;
default:
$return_string .= "<td width='102'><img src='images/graphics/blank.gif' height='24' width='105' border='0' /></td>
<td width='51'><a onmouseover=\"changeImages('topNav_but_contact','images/buttons/topNav_but_contact_over.gif');return true\" onmouseout=\"changeImages('topNav_but_contact','images/buttons/topNav_but_contact.gif');return true\" href='contact.php'><img id='topNav_but_contact' src='images/buttons/topNav_but_contact.gif' alt='' name='topNav_but_contact' height='24' width='54' border='0' /></a></td>
<td><a onmouseover=\"changeImages('topNav_but_logout','images/buttons/topNav_but_logout_over.gif');return true\" onmouseout=\"changeImages('topNav_but_logout','images/buttons/topNav_but_logout.gif');return true\" href='logout.php'><img id='topNav_but_logout' src='images/buttons/topNav_but_logout.gif' alt='' name='topNav_but_logout' height='24' width='48' border='0' /></a></td>
";
}
$return_string .= "</tr>
</table>
<table width='756' cellspacing='0' cellpadding='0'>
<tr>
<td align'left'><img src='images/graphics/topNav_tabbg.gif' alt='' height='30' width='54' border='0' /></td>";
wwitch (TRUE)
{
case ($page_type == "welcome"):
$return_string .= "
<td><img src='images/graphics/topNav_tabbg.gif' alt='' height='30' width='44' border='0' /></td>
<td><img id='topNav_tab_welcome' src='images/buttons/topNav_tab_welcome_over.gif' alt='' name='topNav_tab_welcome' height='30' width='72' border='0' /></td>
<td><img src='images/graphics/topNav_tabbg.gif' alt='' height='30' width='18' border='0' /></td>
<td><a onmouseover=\"changeImages('topNav_tab_about','images/buttons/topNav_tab_about_over.gif');return true\" onmouseout=\"changeImages('topNav_tab_about','images/buttons/topNav_tab_about.gif');return true\" href='about_ig.php'><img id='topNav_tab_about' src='images/buttons/topNav_tab_about.gif' alt='' name='topNav_tab_about' height='30' width='129' border='0' /></a></td>
<td><img src='images/graphics/topNav_tabbg.gif' alt='' height='30' width='18' border='0' /></td>
<td><a onmouseover=\"changeImages('topNav_tab_advisors','images/buttons/topNav_tab_advisors_over.gif');return true\" onmouseout=\"changeImages('topNav_tab_advisors','images/buttons/topNav_tab_advisors.gif');return true\" href='our_advisors.php'><img id='topNav_tab_advisors' src='images/buttons/topNav_tab_advisors.gif' alt='' name='topNav_tab_advisors' height='30' width='90' border='0' /></a></td>
<td><img src='images/graphics/topNav_tabbg.gif' alt='' height='30' width='18' border='0' /></td>
<td><a onmouseover=\"changeImages('topNav_tab_profile','images/buttons/topNav_tab_profile_over.gif');return true\" onmouseout=\"changeImages('topNav_tab_profile','images/buttons/topNav_tab_profile.gif');return true\" href='add_section_1.php'><img id='topNav_tab_profile' src='images/buttons/topNav_tab_profile.gif' alt='' name='topNav_tab_profile' height='30' width='138' border='0' /></a></td>
<td><img src='images/graphics/topNav_tabbg.gif' alt='' height='30' width='18' border='0' /></td>";
break;
*** KODE SLUT ***
Det her gentages så, afhængig af antallet af menupunkter. Håber nogen kan hjælpe! Og undskyld, hvis det skulle have været i PHP :)
/Stenger
