davywylie Posted January 25, 2006 Share Posted January 25, 2006 I am trying to convert the horizontal menu, to a vertical one, but I am unable to get the sub menus to appear to the side of the main menu, can ne one help<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="15%"><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="history.php/#C2">HTML</a></td></tr> <tr><td class="menu"><a href="history.php/#C3">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> Link to comment Share on other sites More sharing options...
scott100 Posted January 25, 2006 Share Posted January 25, 2006 Replace this tutorials table with the one you currently have, i just added style="left:90px" to it and it works ok.<table class="menu" id="tutorials" width="120" style="left:90px"><tr><td class="menu"><a href="history.php/#C2">HTML</a></td></tr><tr><td class="menu"><a href="history.php/#C3">XHTML</a></td></tr></td></tr></table> Link to comment Share on other sites More sharing options...
davywylie Posted January 25, 2006 Author Share Posted January 25, 2006 Replace this tutorials table with the one you currently have, i just added style="left:90px" to it and it works ok.<table class="menu" id="tutorials" width="120" style="left:90px"><tr><td class="menu"><a href="history.php/#C2">HTML</a></td></tr><tr><td class="menu"><a href="history.php/#C3">XHTML</a></td></tr></td></tr></table><{POST_SNAPBACK}> thanks, but is there ne way of havin it level with the menu option, and not starting on the one below Link to comment Share on other sites More sharing options...
scott100 Posted January 25, 2006 Share Posted January 25, 2006 thanks, but is there ne way of havin it level with the menu option, and not starting on the one below<{POST_SNAPBACK}> Yes, just add a top to the style:<table class="menu" id="tutorials" width="120" style="left:90px;top:35px"> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now