PDA

View Full Version : men needs help!



davywylie
01-25-2006, 12:54 PM
hi, I have created this menu - see code below - but i am unable to get get the sub menus to go to the right of the main menu, instead of on top of the current menu. Does ne one know how to fix this

<!--homepage-->
<html>
<head>

<style>


body{font-family:arial;}
table{font-size:80%;background:transparent}
a{color:333333;text-decoration:none;font:bold}
a:hover{color:#606060}
td.menu{background:00cc66}
table.menu
{
font-size:100%;
position:absolute;
visibility:hidden;
}
</style>

<script type="text/javascript">
function showmenu(elmnt)
{
document.getElementById(elmnt).style.visibility="visible"
}
function hidemenu(elmnt)
{
document.getElementById(elmnt).style.visibility="hidden"
}
</script>

</head>

<body>


<table width="20%">

<tr bgcolor="cccccc"><td><a href="customeraccess.php">customer Login</a></td></tr>

<tr bgcolor="cccccc"> <td onmouseover="showmenu('tutorials')" onmouseout="hidemenu('tutorials')">
<a href="/default.asp">Tutorials</a><br />

<table class="menu" id="tutorials" width="120">
<tr><td class="menu"><a href="dsd.php">HTML</a></td></tr>
<tr><td class="menu"><a href="rt.php">XHTML</a></td></tr>
</td></tr></table>

<tr bgcolor="cccccc"> <td onmouseover="showmenu('Categories')" onmouseout="hidemenu('Categories')">
<a href="customerviewProducts.php">Products</a><br />
<table class="menu" id="Categories" width="100">

<?php
require_once ('mysql_connect.php'); // Connect to the database.

$dbQuery ="SELECT * FROM category" .
" ORDER BY CategoryName ASC ";
$result=mysql_query($dbQuery, $dbc);

while ($dbRow=mysql_fetch_array($result)) {
$name=$dbRow["CategoryName"];
echo "<tr><td class=menu><A HREF=customerviewProducts.php?passCategory=$name>$name</A></td></tr>";
}
?>
</td></tr>

</table>

<tr bgcolor="cccccc"><td><a href="welfare.php">Quality Assurance</a></td></tr>
<tr bgcolor="cccccc"><td><a href="newoffers.php">New Offers</a></td></tr>
<tr bgcolor="cccccc"><td><a href="addcustomer.php">Sign Up</a></td></tr>


</tr>
</table>