Menu Item Width Mystery...extra spacing to the right!

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
pinchio
Beginner
Beginner
Posts: 9
Joined: Fri Mar 26, 2004 5:23 pm

Menu Item Width Mystery...extra spacing to the right!

Post by pinchio »

I've been playing with the menu and I can't seem to figure out why there is spacing to the right of menu items. Here is my code and a picture.

Image

Code: Select all

_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=50            // The time delay before menus open on mouse over
_subOffsetTop=0             // Sub menu top offset
_subOffsetLeft=1            // Sub menu left offset

with(menuStyle=new mm_style()){
onbgcolor="#000000";
oncolor="#99CCFF";
offbgcolor="#000000";
offcolor="#ffffff";
bordercolor="#ffffff";
borderstyle="solid";
borderwidth=1;
separatorcolor="#ffffff";
separatorsize=1;
separatorwidth=1;
padding=2;
fontsize="70%";
fontstyle="normal";
fontweight="bold";
fontfamily="verdana,arial,sans-serif";
pagecolor="#99CCFF";
pagebgcolor="#000000";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="";
subimagepadding="0";
}
//*****************************************************************
with(milonic=new menuname("Main Menu")){
style=menuStyle;
//menuwidth=488;
top=25;
left=260;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=/default.asp;status=Home;");
aI("text=Download Library;url=/downloads.asp;status=Download Library;");
aI("text=Forums;url=/forums.asp;status=Discussion Forums;");
aI("text=Support FAQ;url=#;status=Support FAQ;");
aI("text=Contact Us;url=/content.asp?contentID=346;status=Contact US");
}
//*****************************************************************
drawMenus();
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

It looks fine to me, maybe you are trying to center the text, then to add to your styles
align="center";

?

maz
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Try removing subimage=""; and subimagepadding="0";.
John
pinchio
Beginner
Beginner
Posts: 9
Joined: Fri Mar 26, 2004 5:23 pm

Post by pinchio »

Still no good, it still places padding to the right.

What I really would like is to not specify the width of the menu or menu items but have them size as necessary to fit the text. I've set the placement of the menubar absolute with top and left properties so I know exactly where the menubar appears and that works fine. Now all I need is the darn menu items to behave. :evil:

Thanks for any help, keep em coming I'll solve this sometime.
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

In that case, completely remove all // and all those stars****

Don't leave anything extra in there first,and make sure you have version 5.1 then I'll take another look.

maz
pinchio
Beginner
Beginner
Posts: 9
Joined: Fri Mar 26, 2004 5:23 pm

Post by pinchio »

I've done as you mentioned but still the same. I have version 5.1 installed. Here is the code so far including edits.

Code: Select all

_menuCloseDelay=500
_menuOpenDelay=50
_subOffsetTop=0
_subOffsetLeft=1 
with(menuStyle=new mm_style()){
onbgcolor="#000000";
oncolor="#99CCFF";
offbgcolor="#000000";
offcolor="#ffffff";
padding=2;
fontsize="70%";
fontstyle="normal";
fontweight="bold";
fontfamily="verdana,arial,sans-serif";
pagecolor="#99CCFF";
pagebgcolor="#000000";
headercolor="#000000";
headerbgcolor="#ffffff";
}
with(milonic=new menuname("Main Menu")){
style=menuStyle;
menuwidth=450;
top=25;
left=260;
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=/default.asp;status=Home;");
aI("text=Download Library;url=/downloads.asp;status=Download Library;");
aI("text=Forums;url=/forums.asp;status=Discussion Forums;");
aI("text=Support FAQ;url=javascript:xlaAFMlaunch();status=Support FAQ;");
aI("text=Contact Us;url=/content.asp?contentID=346;status=Contact US");
}
drawMenus();
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I'm not seeing a problem. I used the last one you gave and 5.1, then put it up on the web. It looks fine in ie5.5, netscape 6, 7, firebird.07. It is up above the black line in opera 6, 7, and netscape 4.79. But, doesn't look funny, as if it had been designed to be up a little higher than the black line. I believe that has to do with the browsers and their margins.

LINKS REMOVED

Then I went and took what you said and eliminated the menuwidth, and put back in the border and separator. It also works fine in those mentioned browsers.




Hope this helps.

Ruth
Last edited by Ruth on Mon Apr 05, 2004 4:09 pm, edited 1 time in total.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Interesting, Ruth. I downloaded his files and posted them and couldn't get the menu to show at all! Maybe another nap will help.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Lord, don't say nap... I need one. I never thought to actually go and find the site and get the files, I just used what he put here which has different text. So, I just went and downloaded his files and they work fine. Well, at first I thought it was frozen because nothing happened when you moused over, but as soon as the little scroller started below it, then the menu worked.

Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

That's definitely strange. All I brought down were the menu-specific files. No workee...
John
pinchio
Beginner
Beginner
Posts: 9
Joined: Fri Mar 26, 2004 5:23 pm

Post by pinchio »

Ruth, your test site looks like the way I want it, no padding occuring to the right of the menu items. I'll download your test script to see how it behaves on mine.

let you know how it works out.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

If it works OK for you, please do a code comparison and see if you can find what the exact problem was. Good teaching tool for all of us.
John
pinchio
Beginner
Beginner
Posts: 9
Joined: Fri Mar 26, 2004 5:23 pm

Post by pinchio »

Sorry guys, still no luck. If you like I've put together a small screen capture movie (.avi) which shows you what I'm up against. In the first example you'll see my original code and in the second example you'll see Ruth's code and how it renders. As you'll see it's not like Ruth's and I still see padding to the right of the menu items.

Any help would be appreciated.

BTW: I'm using 5.1 version of milonic menu.

View the video: http://www.marchnetworks.com/menuitem-padding-issue.avi
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Is there some way you can put up the actual page. The video shows what you are seeing, and I was pretty sure that was it, but I can't see the code on the page itself or get the css files and such, and work with it to try and find the problem. I went back and actually downloaded your main page, removed the company, products, markets etc. images, subsituted a plain black one equal to their width and put my menu data file with the corrections I did onto the page, uploaded it to my site with your other menu files and all the images and stuff, and it doesnt do what the video shows, so unless I can see the actual page you are getting this result on, I can't figure out what's up. So, check the url and see if it still looks like that for you, or if it is correct. If it isn't correct, then perhaps the issue is someplace in the css style files in combination with the browser you are using.

http://www.poems2u.com/help/march/sitepage.htm

Ruth
czer9621
Beginner
Beginner
Posts: 1
Joined: Tue Apr 06, 2004 7:22 pm

Post by czer9621 »

could it be a separate style sheet interfering? maybe you've set padding or something for tables in general?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I did think of that but since I dont' see the problem I can't really test the style sheet. :) When I take that main site page and put the menu on it, it works fine with no extra space on any of the browsers I've tried, but of course I don't know if the style sheet is different for the one about which he's asking. That's a good suggestion to have them check to see if there's been a change there.

Ruth
Post Reply