Mark, thanks for your advice.
But also with giving the div widths less than 100% I still don't get the ul with the menu in the middle. In fact: I get everything centered exept ... the ul with the menu.
It has something to do with the "float:left;" of the li
Code: Select all
/* menu list items */
div#menu_horiz li {
float: left; /* makes the list horizontal */
list-style: none; /* hides the list bullet */
margin: 0 ;
border-right: 1px solid #C0C0C0;
}
When I change this to
Code: Select all
/* menu list items */
div#menu_horiz li {
list-style: none; /* hides the list bullet */
margin: 0 ;
border-right: 1px solid #C0C0C0;
}
the menu ul is well centered ... but it became a vertical menu instead of the horizontal menu I have in mind
Look for an example of both the codes on :
http://www.reinaert.org/index.php?page=test-fisheye-css-dock-menu
The adjustment of the width% seems only to work well with menu with almost fixed total width. And in my case the width of each menu on level 2 will be unpredictable.
Since I implemented the css dock menu in a menu manager template (kinda dirty but efficient trick by using the field "titleattribute" for the paths to the images)
Code: Select all
{if $count > 0}
{foreach from=$nodelist item=node}
<a class="dock-item2" href="{$node->url}"><span>{$node->menutext}</span><img src="{$node->titleattribute}" alt="{$node->menutext}" /></a>
{/foreach}
{/if}
It would be an advantage for the enduser not having to concern about how many menu's to use on both levels 1 and 2.
The few "centered horizontal ul" solutions I found on the web or the cmsms forum seem all for a fixed number of li.
So if you or anyone can help ... thanks in advance!