PDA

View Full Version : CSS Chrome Menu menus go up instead of down?



kenwvs
11-11-2007, 08:06 AM
1) Script Title: Chrome CSS Drop Down Menu

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

3) Describe problem: I have this script up and working and love it. I am wondering if it is possible to have the drop down menus go upward, instead of downward. With the layout of the site, it would be beneficial to have them all go up instead. I am not sure if this is possible.

ddadmin
11-11-2007, 08:35 AM
Do you mean always drop upwards, regardless of whether there's enough space below the menu (or enough space above, for that matter)? Right now the menus actually will drop up if there isn't enough viewable space below the menu bar...

kenwvs
11-11-2007, 10:01 AM
Thanks for the quick reply.

Yes, I would like them to always drop upwards

ddadmin
11-12-2007, 05:24 AM
Sure, inside the .js file, just find the lines:


this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"

and change them to:


this.dropmenuobj.style.left=this.dropmenuobj.x+"px"
this.dropmenuobj.style.top=this.dropmenuobj.y-this.dropmenuobj.offsetHeight+1+"px"

kenwvs
11-12-2007, 06:21 AM
Thanks for your help, it is greatly appreciated.