PDA

View Full Version : Accordion Menu Problem in IE6 / FF2



the_dreamer
03-08-2008, 04:22 PM
1) Script Title: Accordion Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu.htm

3) Describe problem: Look here (http://www.itonic.at/test/test/)

"Working fields" and "Projects" are animated. In IE7 is all OK, but in IE6 the submenus are far away from each other, which makes the whole menu very long. In FF2 the submenu is too compact where there's almost no space between the lines.

Here (http://www.itonic.at/test/test/css/nav.css) you can find the CSS.

Does anybody has a hint? Thanks.

ddadmin
03-08-2008, 08:02 PM
Try removing the below line in red in nav.css:


.glossymenu div.submenu ul li a{
display: block:

Since your links are just plain links, there's no point in using the above line.

the_dreamer
03-09-2008, 03:36 PM
Thanks!!! That does it.

Another question:
If you open one animated submenu in FF and zoom the font with ctrl + the left margin for the submenu is not on the same line (vertically). I can't see where the mistake is. Do you have an idea?
Thanks.

ddadmin
03-09-2008, 05:35 PM
You may need to experiment a bit, by adding a margin-left either within the A element itself, or its parent LI element, something like:


.glossymenu div.submenu ul li{
margin-top: 0;
margin-left: 10px;
padding: 0;
}

.glossymenu div.submenu ul li a{
/* display: block; */
font: bold 9px Arial, Verdana, Helvetica, sans-serif;
color: black;
text-decoration: none;
padding: 0 0 0 10px;
margin-left: 10px;
}

You'd only be adding 1 of the above 3 highlighted at any given time, removing the other two.

the_dreamer
03-10-2008, 12:20 PM
Yeah thanks, a "left-margin" ind the ".glossymenu div.submenu ul" fixed it.
Great script btw. :-)

the_dreamer
03-10-2008, 12:37 PM
Another one :-)
Is this scenario possible? You are in the "about" page and click on "working fields" or on "products". I want to open the corresponding site with it's submenu expanded. In the moment it keeps the state I left it before.
I hope this makes sense.

How can I integrate it? What is meant by index1, etc?
Maybe a dump question but ..... thanks.

ddadmin
03-10-2008, 11:34 PM
The persistence feature if enabled should do this already, with a little tweak if the pages using the Accordion Menu on your site reside in different sub directories. See this thread: http://www.dynamicdrive.com/forums/showthread.php?t=29603

the_dreamer
03-11-2008, 08:12 AM
Thanks ddadmin!
I changed the line in the script and what it does now, is that it keeps the submenus collapsed, and not like I want it to, expanded, but accordingly to the site I'm opening, like I explained earlier.

Can I achieve that with the "defaultexpanded" line in the init-script?
I'm not sure what I should put in there, the filename with path?
Thanks!

the_dreamer
03-12-2008, 01:41 PM
bumb.....anyone an idea?

ddadmin
03-13-2008, 08:38 AM
I'm not sure I quite understand your next to last post. But in general, the defaultexpanded parameter would be used to contain the indices of the headers you wish to be expanded by default, such as:



defaultexpanded: [0,1],

This causes the 1st and 2nd headers to be expanded by default, though if you have persistence turned on as well, you'll want to close the browser then reopen it to see the former take effect.

the_dreamer
03-13-2008, 10:21 AM
Thanks a lot. It works now!