Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:16
Unwanted Horizontal Scrollbars
Poster: spirollo
Dated: Wednesday August 27 2003 - 18:45:04 BST
I am putting new menus together in v5.0 I used the overflow="scroll" command so menus longer than the browser window will have a vertical scrollbar.
The problem is that whenever I have a vertical scrollbar appear, I also have a horizontal scrollbar appear on the menu as well. This occurs even though there is plenty of room for the width of the menu.
Any insight would be appreciated.
Poster: John
Dated: Wednesday August 27 2003 - 21:57:37 BST
Please post a URL so we can see the error and your code.
Poster: spirollo
Dated: Thursday August 28 2003 - 1:45:40 BST
Sorry, that would help.
Here is the link. Make the window stretch the entire screen, but make height very short. Check out the menu Teams/MLB/American League for instance.
http://209.210.237.14:8080/spbaseball/ownerarea/oatemplate.vm?incfile=notify
Poster: Maz
Dated: Thursday August 28 2003 - 2:55:23 BST
Don't understand the problem, but note I got script error on member menu submenu line 193 char 295 Invalid procedure call or argument.
Poster: Hergio
Dated: Thursday August 28 2003 - 4:26:01 BST
Its because the menu renders to the width of the longest string within it...which is fine. But then there are too many items to fit, so it must put in a scroll bar, and uh-oh, now we dont have room anymore with regard to the width, gotta throw in another scroll bar. To fix this, explicitly increase the width of the menu so that when the scroll bar appears, the menu is still wide enough to accomedate it. In your menu declaration, you can set an itemwidth property to something like, "120px". Look in the menuproperties reference if you dont understand.
Poster: spirollo
Dated: Thursday August 28 2003 - 16:36:21 BST
I understand what you are saying about it not taking into account the vertical scrollbar into the width - thus causing the need for the horizontal. I thought that was the case myself. But if that is the case, I would think that the sample menus the provide would have the same problem as I don't see where they are explicitly setting the width to make them work. So I think there is some other problem. For instance, check out the sample menu in the URL below. Note that the "Menu Samples" submenu has a veritcal scroll bar, but no horizontal one. And I see no where in the setup where it set the width explicitly.
http://www.milonic.com/menusample.php?sampleid=1
Thanks for your responses.
Poster: Hergio
Dated: Thursday August 28 2003 - 17:20:43 BST
He has his padding setting set to 5, yours is 2....try that. Play with it, I dont know for sure, I am giving you ideas. Also did you try the itemwidth?
Poster: spirollo
Dated: Thursday August 28 2003 - 21:29:16 BST
Good ideas. I tried both of them, but still no dice...
Poster: John
Dated: Thursday August 28 2003 - 21:41:44 BST
Why do you have the scriptpath variable in the middle of your HTML? It belongs in milonic_src.
Poster: spirollo
Dated: Friday August 29 2003 - 20:12:01 BST
Regarding the scriptpath, it is there because it is a dynamic path. For ease at the moment I put it in there so my velocity macros can process the path and set it. I will eventually include the milonic_src.js as a velocity macro as well but haven't gotten that far yet.
Regarding my reported problem, I seem to have found the culprit. When you have a menu in an html body that has the CSS attribute "overflow-y" set to "hidden". It causes the horizontal scroll bars to appear, regardless if there is room on the width of the page or not. If that is changed to something other than hidden, it works like a champ.
I have reported this bug to Andy for his consideration.
I'd like to thank you all for your responses and help.