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

Right aligning one element, and fixing length and height


Poster: peterg7
Dated: Saturday October 16 2004 - 17:09:55 BST

Hi

we have a current navigation bar at http://www.gradwell.com/index.php which we want to replace with a milonic menu. We have a development page here: http://www.gradwell.com/menuindex.php

We currently style the nav bar with CSS and we have one element "webmail" (which is the far right element) right aligned, with all the rest left aligned.

Is it possible to do this on the Milonic Menu?

---

Secondly, we want to force the menu to fit into the box we defined using a <div> tag for our other navigation menu. We've managed to kludge it in place with some positioning, but are concerned that this won't work on everything. Is it possible to fit the menu between two <div> tags? Setting the positioning to relative didn't seem to work.

---

Finally, and this is related to the above point, we can't make the menu have the same width as the rest of the full-with items on the page. We're not using fixed widths in our style sheet (the elements fill the whole page, but have 5px padding), and it seems that setting it's width to be 98.25% is the best I can get - but it's not perfect, and it is dependent on fixed positioning.

---

Suggestions most welcome, but if anyone wants to complete the development of this menu for $$, do let me know.

many thanks
peter


Poster: Ruth
Dated: Monday October 18 2004 - 8:11:08 BST

The only way I could get it to work was to

1. copy and paste the menuStyle as it is, change the name to menuStyle1. This now gives you two menu styles. In the original add itemheight="22px";, in the new menuStyle1 make borderwidth=0; and add itemheight=13px;

2. take the mail item from the main menu, create a new menu with only that item in it like below.
Code:
with(milonic=new menuname("Main Menu1")){
style=menuStyle1;
top=86;
screenposition="right";
left="offset=-20";
alwaysvisible=1;
orientation="horizontal";
aI("text=Webmail;showmenu=Webmail;");
}


As to the other items. Netscape, IE, Firefox, Opera all seem to have their own built in margins and they don't seem to be the same. One thing you can do is to make the menu 100% and set it at screenposition="center"; removing the left setting. This will keep the menu always in the center of the page no matter what the resolution. However, although it works perfectly sitting exactly above what you have now in IE, in Netscape and related browsers it will span 100%. It doesn't seem to read the margins you have on the page.

As to the divs, the menu is made up of divs and spans etc and doesn't react well to being in a div in some browsers. There is a way to put it in a table which you can see at http://www.milonic.com/tablemenu.php You could then set the table at 100% and center it. But, I'd have to work on the fix for making the mail be all the way right. It should still work just as it does now because it is set a screenposition="right" and if table is spanning 100% then the fix should work fine. I'll let you know.

Someone else may have some suggestions. I've tried using rawcss= and put in margin, put in padding but i can't seem to get that to work as it should.

Ruth