View Single Post
Old 10-May-07, 10:09 PM   #2 (permalink)
Hak Foo
Apex Elite Tech
 
Hak Foo's Avatar
 
Join Date: Mar 2006
Posts: 1,231
Hak Foo is respected by manyHak Foo is respected by manyHak Foo is respected by many
Default Re: Help with css dropdown menu

Quote:
Originally Posted by largo
i have a CSS drop down menu that needs to be centered on a web page as well as work with IE 6 & 7. So far i have this code which works well in Firefox but it is left justified and it causes my site not to function in IE. any assistance would be greatly appreciated. www.kendallhurleygallery.com/menucode.txt *edit*sorry about the link but the code tags won't work

Here's an approach somewhat inspired by the menu scripts that dynamicdrive.com offers-- if you don't want to just use them. -Make the top "menu titles" as links with onmouseover actions. -Make the menus themselves divs set to "display:none", "position:absolute", and the "top", "left", "right", and "margin-left"/"margin-right" properties set to position them how you want. -On the "onmouseover" event, you set a flag that says "leave menu up" and display the menu by setting its style as "display: block;" -If you enter the menu itself, you set the flag again -If you leave the menu or the menu button, you clear the flag and set a timeout of like 10ms. -When the timeout's called, if the flag is set, do nothing, otherwhise, hide the menu because we're no longer holding the mouse over it. Nested menus are a logical extension of this, but would require you to hide the parent menu when you hide the child menu, and to set the "leave the menu up" flag when you enter a child menu.
__________________
Hak Foo is offline   Reply With Quote
 
Page generated in 0.08648 seconds with 8 queries