View Full Version : Smooth Navigational Menu (v1.4) CSS questions

06-30-2010, 06:18 PM
1) Script Title: Smooth Navigational Menu (v1.4)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddsmoothmenu.htm

3) Describe problem: Thanks for Smooth Navigational Menu!

How do I:

1) set a top-level menu item's background color for the case when it's 'On' - regardless of the top or sub menu's hover state?

2) stop the (rightmost) sub menus from repositioning themselves if they're too close to the window's right edges?


07-01-2010, 08:48 PM
For the later, try and comment out the below line inside the .js file:

//menuleft=(header._offsets.left+menuleft+header._dimensions.subulw>$(window).width())? (header.istopheader && setting.orientation!='v'? -header._dimensions.subulw+header._dimensions.w : -header._dimensions.w) : menuleft //calculate this sub menu's offsets from its parent

For the former, how do you define "on"? If you mean have the menu item that corresponds to the current page be highlighted automatically, the issue is not so much how to highlight the menu item as it is how to detect which menu item corresponds to the current page. The later is more tricky, and depends on a few factors such as the structure of your URLs.

07-01-2010, 08:52 PM
Thanks; I've written a new class to correspond to the 'On' state, and can attach it to the relevant 'tab' in our CMS.

Am still looking for a way to suppress that right move, please :-)

07-01-2010, 09:50 PM
Am still looking for a way to suppress that right move, please :-)

Did you try commenting out the line I mentioned above?

07-06-2010, 02:07 PM
Thanks. I'll give that a try. Your help appreciated!