View Full Version : Resolved Problem with Glossy Accordion script for menu width

07-08-2013, 07:21 PM
1) Problem with Glossy Accordion script for menu width

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

3) Hello guys, this may seems very stupid, but i used the Glossy Accordion to show/hide documents that are retrieved with some asp linked to a coveo/copernic tool which is indexing (is that even a word?) some files on a server.

What I want to do is categorize my documents by categories. I can do it fine with the glossy Accordion, but i cannot change the width of it. The maximum width i've been is around 400-500 px but i would like to take more than 80% of the total width of my page.

I've been trying to change the width within the css, but it doesn't do much.
Did I miss something obvious?

Here's a printscreen of what I get.

I need your help to fix this.
Thank you very much !

Note: Sorry for my english, it is not my first language. (Don't be shy to tell me if I spelled a word wrong)

Have a nice day!

07-09-2013, 03:33 AM
Not unless you missed:

margin: 5px 0;
padding: 0;
width: 170px; /*width of menu*/
border: 1px solid #9A9A9A;
border-bottom-width: 0;

I deleted that (highlighted) using developer tools and the menu on the demo page went across the entire section where it was located. The only thing bounding it at that point was its parent element (click the image to see):


So, if you tried that and it didn't work, then perhaps the parent element on your page is narrow.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

07-09-2013, 12:35 PM
Good morning.

I must thank you a million times, because you were right, my problem was the parent element. I didn't knew it but I saw there was a table with <tr>, <td> juste before my list of elements.

I removed it and everything showed just fine. One last question; by removing the "width" part, my accordion will ajust itself to the content and if I put a fix dimension it won't change ?

Thank you very much for your help!
Have a nice day!

07-09-2013, 02:34 PM
I can't be certain what will happen on your page. On the demo page it adjusted to the width of the parent.

And I'm not sure what you mean by content. Do you mean the parent? Then Yes. Or do you mean the amount of information in each menu item? I think the amount of information will only come into play if it's still more than will fit on one line, then it will have to wrap. If the individual menu items have a width specified, that would probably come into play. Did you mean something else by 'content'?

It might be better if you just tried out what you want to do. If it doesn't work like you want it, explain what it's doing and what you want it to do, and give me a link to a live page where I can see it.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

07-09-2013, 02:46 PM
I was talking about the elements within the accordion, but after a few tests, it seems to ajust itself depending on the length of my items.

It works perfectly the way it is right now, so I will keep it like that.
Unfortunately, I couldn't put the URL to the page because it is in an Intranet, so you wouldn't be able to see, but you gave me enough tips and hints and I found the problem source.

I must thank you again for your time, your help was very appreciated. I'm a trainee at work and being able to "revamp" this site will greatly help me.

Thanks a lot and have a nice day !