Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:32

Menus and table cell centering


Poster: funkykeys
Dated: Monday September 12 2005 - 23:12:32 BST

Hi,

I've setup horizontal menus and am having a problem. Essentially, I'd like the primary menu links to center within a table cell, and without a static width for everything, since the client edits all menus/submenus through a Web-based admin and the lengths of chars will change often. It'd be great to have each primary menu link render with a preset space in between, rather than a static width for all items.

Is what I'm asking possible? Please check it out at http://iippc.projectphoenix.com/items.aspx and see what I've done toward the top of the page against the green bg.

Thanks!


Poster: Ruth
Dated: Friday September 16 2005 - 0:32:31 BST

I'm not sure I understand. Are you saying you want the text in the item to be centered? Use the align="center"; parameter. If you are saying you want the 'mainmenu' to be centered in the table cell, what i always do is just make a nested table, put the menu in it and center the table. For example,
Code:
<tr><td><center><table border="0" cellpadding="0" cellspacing="0" align="center"><tr><td>main menu</td></tr></table></center></td></tr>
I also use the 'center' tags as you can see. I never know what browsers to what with what, so I just put it all in.

Ruth


Poster: funkykeys
Dated: Friday September 16 2005 - 6:18:06 BST

Thanks, Ruth -- I figured it out. Reading the instructions always helps!

I just added the <script> tag in the centered cell and set the position parameter to "relative." Works great. :)


Poster: Ruth
Dated: Friday September 16 2005 - 14:47:03 BST

Hi,

Just to make sure on the directions for table placed menus, the only menu that should be in that table cell is the main menu. The submenus are supposed to be built/read before the main menu gets rendered. Usually, the submenus are put in their own file, either with the styles or the styles can be their own file also, and the main menu is either put in a file by itself and called in the table cell alone, or it is placed directly into the table cell. As you found, the main menu is then called in the cell in between script tags.

Ruth