Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

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:54

First submenu leaves thin white vertical line on left side


Poster: Marc-Andre.Roberge __at__ mus.ul
Dated: Wednesday November 26 2003 - 20:16:51 GMT

I don't know if you will call this a bug, but I have noticed that since RC10 (now using RC27), my full width horizontal menu no longer displays as it used to. My setting is menuwidth="100%", left-aligned, with no border. Now I see (still using the same personalized file) that when I drop down the left-most menu, the (white) background shows on the left side of the menu. Up to RC9 (I went back through all versions to check), the leftmost menu covered the surface fully and did not leave this thin line. Otherwise everything looks as expected and desired. Have a look at <http://www.mus.ulaval.ca/roberge/gdrm/>

My code reads as follows:

Code:
with(menuStyle=new mm_style()){
offcolor="#000000";
offbgcolor="#cc9933";
oncolor="#000000";
onbgcolor="#cccc99";
fontsize=12;
fontstyle="normal";
fontweight="normal";
fontfamily="Verdana,Arial,Helvetica";
padding=3;
}

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=158;
menuwidth="100%";
menualign="left";
alwaysvisible=1;
orientation="horizontal";
...
}


Poster: kevin3442
Dated: Thursday November 27 2003 - 6:22:23 GMT

I see what you're talking about, but I have no solution to offer. I tried setting a left offset in the first menu, but it still opened in the same place. If you move the main menu to left=2 or so, you'll also notice that the left edge of the first submenu opens even with the left edge of the main menu. Based on these experiments, I'm assuming that the space you see to the left of your first submenu is the result of the system's built-in anti-collision or anti-clipping methods... i.e., the system is automatically adjusting the submenu's position to place it away from the browsers inner left edge. A trip through the code might verify this, but I haven't had a chance to try that (it's a lot of code!). So, I have to conclude that this behavior is by design and could only be changed by changing the menu code.

On a personal note, I think the current behavior probably yields a better look on your site than if the submenu opened flush with the inner edge of the window. But that's just me.

Kevin


Poster: Marc-Andre.Roberge __at__ mus.ul
Dated: Friday November 28 2003 - 20:05:59 GMT

What I see is that if I add "text=2;" under "with(milonic=new menuname("Main Menu")){ style=menuStyle;", the main menu leaves a blank on the left. Therefore, when the first menu is open, both the main menu and the submenu align and there is a long vertical white background line. I wonder if Andy has noted that difference with previous versions and if this is really by design as you suggest. Thanks anyway for looking into the matter.


Poster: kevin3442
Dated: Friday November 28 2003 - 22:07:19 GMT

Marc-Andre.Roberge __at__ mus.ul wrote:
if I add "text=2;"

text=2 :?: Do you mean left=2, as I had suggested? If that's what you mean, then you are getting the exact behavior that I described...
kevin3442 wrote:
If you move the main menu to left=2 or so, you'll also notice that the left edge of the first submenu opens even with the left edge of the main menu.

In other words, the left side of the main menu and the first submenu align if left=2 in the main menu. The point here is that the left edges of the main menu and the submenu align only if the main menu is not at 0 (or 1 for that matter). If the main menu is at left=0, then the submenu, which would normally open at the same left location as the parent item, is automatically moved to the right by the menu system. Manually applying a left offset to the submenu does not overcome this behavior; the offset is ignored unless the main menu is mved away from the left edge of the window. The only functions that I know of that automatically adjust menu positions have to do with preventing collision with, and therefore clipping by, the edges of the window.

So the tests described above suggest to me that it is these anti-collision functions that are moving the submenu, and must therefore be by design. That's not to say that the design is what you want in this case... just looking for a logical explanation of the behavior. I agree that it's a little odd that the behavior changed after RC19; one wonders why. Of course, there have been several other small shifts or changes since RC19. If you think your menu shouldn't behave the way you describe, you might want to post it in the "bugs" topic.

Regards,

Kevin


Poster: Marc-Andre.Roberge __at__ mus.ul
Dated: Friday November 28 2003 - 22:27:50 GMT

I tried with "left" but wrote "text" by mistake in my message. Thanks again for a detailed reply. I suppose we can now close this thread; I will leave things as they are.