Horizontal centered items

clandmeter - April 24, 2007 - 08:42
Project:Lucid menu
Version:5.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

With horizontal menu's enabled I am not able to center the items. There always seems to be a right padding (or margin) which pushes the content to the right. When I look at the examples of doiMenu they do seem to be able to center properly. I have tried copying the settings of those example menus and paste them into the horizontal settings tab but it does not fix it.

Is this a bug or am i doing something wrong?

Carlo

#1

mr.andrey - June 12, 2007 - 00:56

I'm experiencing the same problem. Items that have children seem to look ok because the drop-down arrow adds extra space, but everything else on the main horizontal menu is off to the right, or rather no padding on the right.

Attached is a screenshot.

Thanks,
Andrey.

AttachmentSize
lucid_menu_problem.jpg 202.15 KB

#2

mr.andrey - June 13, 2007 - 18:49

Figured out a fix for this, here are the instructions.

in modules/lucid_menu/js/doiMenuDOM.js, find this line (twice):

this._items[i]._icon='<td style="padding-left:'+iIcon+'px;">';}

Replace first occurance with this:
this._items[i]._icon='<td class="CustomMenuItemPop">';}

Replace the second occurance with this:
this._items[i]._icon='<td class="CustomMenuItem">';}

Now in themes/zen/zen-fixed/style.css (or your theme equivalent css file), add this:

.doiMenuDOM .CustomMenuItem {
  padding-left: 10px;
}
.doiMenuDOM .CustomMenuItemPop {
  padding-left: 10px;
}

This will set the left padding to 10px instead of 16 - customize it to your own needs.

note: the problem is probably due to doiMenu leaving extra 16px for icons, which I don't think are implemented yet in lucid_menu module.

Cheers!
Andrey

 
 

Drupal is a registered trademark of Dries Buytaert.