Submenu alignment - [Solved]
Submenu alignment - [Solved]
Hi,
I would like to use the Milonic menu on an ecommerce website that I’m creating but have had trouble getting the submenus to align correctly.
My current efforts can be seen here: https://www.hcoms.co.uk/product_group.php
What I would like is for the submenus to all appear in the same place, aligned to the left. At the moment easch submenu opens under its parent main menu item.
Can this be done when using a relatively positioned main menu?
Thanks,
Ben.
I would like to use the Milonic menu on an ecommerce website that I’m creating but have had trouble getting the submenus to align correctly.
My current efforts can be seen here: https://www.hcoms.co.uk/product_group.php
What I would like is for the submenus to all appear in the same place, aligned to the left. At the moment easch submenu opens under its parent main menu item.
Can this be done when using a relatively positioned main menu?
Thanks,
Ben.
-
- Super Advanced
- Posts: 72
- Joined: Fri Jul 01, 2005 3:04 pm
Hi,
Try using:
screenposition="center"; left="offset=-195";
example:
Try using:
screenposition="center"; left="offset=-195";
example:
Code: Select all
with(milonic=new menuname("Milonic")){
orientation="horizontal";
style=subMenuStyle;
screenposition="center"; left="offset=-195";
aI("align=center;text=Products;url=http://milonic.com/cbuy.php;");
aI("text=Contact Us;url=http://milonic.com/contact.php;");
aI("align=center;text=Newsletter;url=http://milonic.com/newsletter.php;");
aI("text=FAQ;url=http://milonic.com/menufaq.php;");
aI("align=center;text=Discussion Forum;url=http://milonic.com/forum/;");
}
Hi,
[This is based on the submenus you now have in which the first two submenus have few items in them, because of that these need to be left as they are or it looks strange.]
The best you could do is to leave those first two items which call a submenu as they are and then set the next ones all to screenposition="center";
The reasoning is this: let's assume you set screenposition="left"; left="offset=16"; All the submenus would then open right inside the left border of the blue submenu area, but ONLY at resolution 800x600. As soon as you change resolution, that left="offset=16"; is no longer enough, it would need to be something like 40 or something at 1024x768, and even more at higher resolutions.
If you are going to have more items in the first main menu items that call submenus you could set all of them to screenposition="center"; That seems to work in IE5.5, Netscape7.1, Firefox 1.0.2, Opera 7.54.
As a final note, I think you need to make that div 56px instead of 54px. At 56 it sits inside that blue area and shows both the top and bottom border of that area in all the above mentioned browsers.
Ruth
[This is based on the submenus you now have in which the first two submenus have few items in them, because of that these need to be left as they are or it looks strange.]
The best you could do is to leave those first two items which call a submenu as they are and then set the next ones all to screenposition="center";
The reasoning is this: let's assume you set screenposition="left"; left="offset=16"; All the submenus would then open right inside the left border of the blue submenu area, but ONLY at resolution 800x600. As soon as you change resolution, that left="offset=16"; is no longer enough, it would need to be something like 40 or something at 1024x768, and even more at higher resolutions.
If you are going to have more items in the first main menu items that call submenus you could set all of them to screenposition="center"; That seems to work in IE5.5, Netscape7.1, Firefox 1.0.2, Opera 7.54.
As a final note, I think you need to make that div 56px instead of 54px. At 56 it sits inside that blue area and shows both the top and bottom border of that area in all the above mentioned browsers.
Ruth
Can I force the width of the submenus and then centre them?
If I set the width of the submenus to be the width of the sites content and then centre them, this should work.
Can I set the width to be fixed and centre them?
Can I set the width to be fixed and centre them?
-
- Super Advanced
- Posts: 72
- Joined: Fri Jul 01, 2005 3:04 pm
Hi Slack,
I'm going to have to check a second time before I post. I cross-my-heart there was no answer when I started working on the issue
As soon as you change resolution the left="offset= has to be a different minus number. If it gets set up so that it's centered only then there's never a worry about that offset number when resolution changes.
Ruth
I'm going to have to check a second time before I post. I cross-my-heart there was no answer when I started working on the issue

Yes your suggestion worked. I guess you could say [not realizing you had responded] I was just adding to it, since it only works when the resolution is set at whatever it was you had it when you did the left="offset=-195";slackbladder wrote:Did my suggestion not work? I re-created your page and it worked for me (ie5.5 FF for MAC and ie6 for PC)
As soon as you change resolution the left="offset= has to be a different minus number. If it gets set up so that it's centered only then there's never a worry about that offset number when resolution changes.
How do you plan on setting the width of the submenus to be the width of the site's content? What happens when the resolution changes? Will that be a problem? What happens when someone changes their text-size in Netscape, Firefox, and other browsers [other than IE] which seem to link that browser textsize feature to the 'user stylesheet' feature? If none of those issues causes the content to change, then you could try setting menuwidth="X"; in the submenu. If that doesn't do it, you can try setting itemwidth="X"; in each item, making the sum of those widths equal to the content.bgraves wrote:If I set the width of the submenus to be the width of the sites content and then centre them, this should work.
Can I set the width to be fixed and centre them?
Ruth
-
- Super Advanced
- Posts: 72
- Joined: Fri Jul 01, 2005 3:04 pm
Hi Ruth,
(is helping me to learn)
I am a bit confused though (its normally the case!) - I did adjust the screen res on both PC and Mac and it didn't affect my re-created page. I was guessing (as are most of my answers
) that:
screenposition="center"; left="offset=-195";
meant center the menu, then offset to the left by 195px. As the HTML page is fixed width it would not matter what the screen res is (it would if the site was variable table width)?
Wow! It's like learning a new language for me
I wouldn't worry - I normally give duff adviceI'm going to have to check a second time before I post.

I am a bit confused though (its normally the case!) - I did adjust the screen res on both PC and Mac and it didn't affect my re-created page. I was guessing (as are most of my answers

screenposition="center"; left="offset=-195";
meant center the menu, then offset to the left by 195px. As the HTML page is fixed width it would not matter what the screen res is (it would if the site was variable table width)?
Wow! It's like learning a new language for me



Ben, use what Slack wrote. That will work, you only have to figure out the 'distance' to offset it from center, and -195 is probably pretty close.
So am I still learning. Mostly I have to 'make' the page to try things, can't do like the program guys who read and can see it in their head.slackbladder wrote:I wouldn't worry .... (is helping me to learn) ......
And, you should be confused!!! You are RIGHT.



But, hey, I bet I don't forget that again

Ruth
-
- Super Advanced
- Posts: 72
- Joined: Fri Jul 01, 2005 3:04 pm
Hi slackbladder,
If there is anything we can do for you, just let us know
Cheers,
Andy
I see you are helping out quite a bit lately, these things don't go un-noticed and I'd just like to say a quick thanks for helping others out, it's most appreciated by all here at Milonic.I like trying to sort others problems out - helps me to learn myself.
If there is anything we can do for you, just let us know

Cheers,
Andy
-
- Super Advanced
- Posts: 72
- Joined: Fri Jul 01, 2005 3:04 pm