Board Logo

Centering menu in a table -Here is the answer
bvogel - 10/26/2006 at 04:10 AM

To center a menu on a page:
create a table equal to the width of your menu. (The table should be centered on the page).
The text in the table should be left justify.
Insert a new layer in the table, and put your menu on this layer.

You can see the result at: www.bmwons.ca
(click on the menu "links")

here is an example:
------------------------------------------------------------------------------
<html>

<head>
<script language="JavaScript" src="menu.js"></script>
<script language="JavaScript" src="menu_items.js"></script>
<script language="JavaScript" src="menu_tpll.js"></script>
<link rel="stylesheet" href="menulink.css">
</head>

<body
<div align="center">
<table border="0" width="658" height="24" id="table1"><tr><td>
<div style="position: absolute; width: 100px; height: 100px; z-index: 1" id="layer1">

<script language="JavaScript">
new menu (MENU_ITEMS, MENU_TPL);
</script>

</div><p>&nbsp;</td></tr></table>
</div>

</body>

</html>


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/