View Full Version : i had modified layout of dd mega menu

12-16-2012, 05:14 PM
i had modified layout of dd mega menu
pls have look http://yoursiteregistrar.com/ddmenu/
but second submenu are not getting display properly. leaving Hugh space on left hand . please help me on that so that all submenu div should start from left.
thanks in advance.

12-16-2012, 07:36 PM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question, in this case, http://www.dynamicdrive.com/dynamicindex1/ddmegamenu.htm

To your question, if I understood it correctly, it's by design that a drop down menu is always positioned relative to the anchor link that triggered it, specifically, the later's left edge (and not the parent container of the anchor link. If you want the later behavior, try locating the following line inside the .js file:

var offset=($submenu.data('istopmenu'))? $anchor.offset() : $anchor.position()

and changing it to:

var offset=($submenu.data('istopmenu'))? $anchor.offset() : $anchor.parent().position()