PDA

View Full Version : Challenging question about showing submenu's of Chrome CSS Dropdown Menu



luluuk
04-06-2008, 02:57 PM
1) Script Title:
Chrome CSS Dropdown Menu

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

3) Describe problem:

First of all, this question is maybe on the edge of the topic-rules.. be prepared ;)
..
I found the wonderful horizontally positioned dropdown menu here on dynamicdrive and loved to use it into the website-example i'm designing for a starting company of a friend of mine.
Implementation of the menu is very simple and the code is very clearly written so it a wonderful piece of code.

Personally don't like sites in which the menu disappears on top when scrolling down the page, so i was searching around for something like an floating menu. On http://www.jtricks.com/javascript/navigation/floating.html i found some code in which everything can be placed to float it along with the scrolling of your page. Very nice and it worked in a minute of implemention!

Only than i found a problem. When scrolling the page a littlebit down, the dropdown menu's of the menu bar are shown also 'that littlebit' below the menu bar!

I've been looking through the codes for couple of hours these days and search on this forum to see of somebody had a simular problem but nothing helped yet.

I know by topic rules (number 2), generally questions about multiple scripts on one page are not anwered but i'm sure the problem is only in the code of the Chrome CSS Menu. All other codes i've tried worked well within the floating script without any trouble. I've also checked the 2 scripts on identic variable names and did not found a problem with that.

Personally i think the problem is in the calculation of the place of the submenu's. It will be like:
'Distance from top page to y-coordinate of the lowest line of the menubar
=
Distance from y-coordinate top menu bar to starting y-coordinate submenu'
With this calculation is can be explained why the submenu are placed more and more below the menu bar while scrolling further down the page.

Demo of a page of the site with the menu http://www.viridis-groenprojecten.nl/diensten.html (site is in dutch ;))

All help is appreciated! Thanks in advance

molendijk
04-06-2008, 07:55 PM
Go to this (http://www.dynamicdrive.com/dynamicindex1/omnislide/index.htm) page. The item you might be interested in is 'MY MENU' on top, which is fixed in non-IE and quasi-fixed in IE.
----
Arie Molendijk.

luluuk
04-08-2008, 10:05 AM
Allright, first of all thank you for looking at my problem.
I will take a look at 'my menu' but i'm affraid i will lose the look of Chrome CSS dropdown menu, which fits perfectly into my site :/
Somebody else?