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

Centering problems


Poster: aeonbb
Dated: Tuesday January 15 2008 - 9:34:43 GMT

Hello,

I have problem implementing the menu in IE.
The test page http://www.ockovanie.org/temp/povinne-ockovanie.html displays menu in the center in Firefox, bot not in IE.
Is it a bug or can it be remedied somehow?

Thanks,
Peter

Re: Centering problems


Poster: Ruth
Dated: Tuesday January 15 2008 - 16:12:22 GMT

Hi,

It looks the same for me in IE6 and FF at resolution 1024x768. What IE version, OS, and resolution shows the problem for you?

Ruth

Re: Centering problems


Poster: aeonbb
Dated: Wednesday January 16 2008 - 8:54:54 GMT

In IE 6 (Win XP, SP2), it looks like this http://www.ockovanie.org/temp/test.jpg
It is not centered but moves more to the right side.

Re: Centering problems


Poster: Ruth
Dated: Wednesday January 16 2008 - 9:45:26 GMT

Hi,

Well, actually it is centered at 1024x768 resolution, since actually the menu centers based on page width and if you look at it, there a horizontal scroll bar at the bottom because the page seems to be something like 1090 px wide rather than the 1024. It's not possible for the menu to read the width of the browser, it has to go by page width

You can fix it, I don't actually know why it is doing that, but the solution is to

1. change your css body margin:0px; to MARGIN-TOP: 0px; MARGIN-RIGHT:0px MARGIN-BOTTOM:0px;MARGIN-LEFT:0px;

2. add
Code:
<DIV id=wrapper>
and wrap all the content. That would go right after the <!-- End Menu --> and before the
Code:
<DIV class=content>


Don't ask me why, because I have no idea. I just experiment with things. With that in there, the page no longer gets a bottom scroll bar and the menu looks centered, though it hasn't moved :)

Ruth

Re: Centering problems


Poster: aeonbb
Dated: Thursday January 17 2008 - 9:47:59 GMT

Hi,

the menu is centered in Firefox under 1024x768 and also 1280x1024 (my default), so IT IS possible to determine the page width.
When used in IE under 1024x768, an unnecessary scrollbar appears, which is NOT there when I remove the menu or change the orientation to vertical, so I feel this is a bug.
When used in IE under 1280x1024, the scrollbar grows even larger, as if the page width was about 1600 pixels, so it suggests there is some miscalculation on the part of your component.

I am not willing to use workarounds, I need this to work as it is supposed to work.

Thanks,
Peter

Re: Centering problems


Poster: Ruth
Dated: Thursday January 17 2008 - 16:35:15 GMT

I think you'll have to contact Milonic. I am a volunteer I do not work for Milonic. Since it seems to be an IE6 issue and css. I don't see how the menu is the problem, then again I am not a programmer, css or js person

Ruth

Re: Centering problems


Poster: aeonbb
Dated: Friday January 18 2008 - 12:05:33 GMT

Solved!

This is the reply from Milonic:

------
Please try changing the following main menu object:


with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
menuwidth="100%";
menualign="center";
orientation="horizontal";
style=menuStyle;
top=76;
aI("align=center;text=Home;url=http://www.milonic.com/;");
aI("align=center;showmenu=Milonic;text=Milonic;");
aI("align=center;showmenu=Partners;text=Partners;");
aI("align=center;showmenu=Links;text=Links;");
aI("align=center;showmenu=MyMilonic;text=MyMilonic;");
aI("align=center;text=Search;");
}



To This:


with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
orientation="horizontal";
style=menuStyle;
top=76;
screenposition="center"
aI("align=center;text=Home;url=http://www.milonic.com/;");
aI("align=center;showmenu=Milonic;text=Milonic;");
aI("align=center;showmenu=Partners;text=Partners;");
aI("align=center;showmenu=Links;text=Links;");
aI("align=center;showmenu=MyMilonic;text=MyMilonic;");
aI("align=center;text=Search;");
}



Setting the menu to 100% will cause problems with CSS, its better to remove it and apply a screenposition instead.

Hope this helps
Milonic Support

Re: Centering problems


Poster: Ruth
Dated: Friday January 18 2008 - 17:02:48 GMT

Hi,

Thanks for posting the solution here. It's great to have it available for other - and me :)

Ruth