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

Need help centering text and line break problem {SOLVED}


Poster: annasue
Dated: Sunday August 28 2005 - 16:21:23 BST

http://www.impressivedesignllc.com/fandw

I first of all want the each menu item to be centered within the space.

Secondly, how can I keep "practice areas" from breaking. I've tried playing with the "itemwidth", but no matter how much space I allow, it still breaks???

Thanks in advance.


Poster: Ruth
Dated: Sunday August 28 2005 - 19:31:23 BST

Hi,

Since you are placing the menu in a table that has a fixed width, I suggest you put in a menuwidth and itemwidth based on pixels instead of percentage.

Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
orientation="horizontal";
overfilter="";
position="relative";
menuwidth=700;
align="center";
itemwidth=138;
aI("text=Firm Overview;url=http://www.fandwlaw.com/overview.html;");
aI("text=Attorney Practices;url=http://www.fandwlaw.com/practices.html;");
aI("text=Practice Areas;url=http://www.fandwlaw.com/practiceareas.html;;showmenu=submenu1");
aI("text=Contact Us;url=http://www.fandwlaw.com/contactus.html;");
aI("text=Home;url=http://www.fandwlaw.com/index.html;");
}
drawMenus();


Try that as your embedded main menu, it stops the break and the align="center"; aligns the text in the center of each item.

Ruth

Reply


Poster: annasue
Dated: Sunday August 28 2005 - 21:12:56 BST

Ruth,

Am I missing something?

I copied only these lines of code:

Code:
menuwidth=700;
align="center";
itemwidth=138;

Now this is my code:

Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=155;
left=200;
alwaysvisible=1;
orientation="horizontal";
overfilter="";
position="relative";
menuwidth=700;
align="center";
itemwidth=138;
aI("text=Firm Overview;url=http://www.fandwlaw.com/overview.html;");
aI("text=Attorney Practices;url=http://www.fandwlaw.com/practices.html;");
aI("text=Practice Areas;url=http://www.fandwlaw.com/practiceareas.html;showmenu=submenu1");
aI("text=Contact Us;url=http://www.fandwlaw.com/contactus.html;");
aI("text=Home;url=http://www.fandwlaw.com/index.html;");
}
drawMenus();

It is still not centering and my "Practice Areas" is breaking and it is not expanding to cover the 700 pixels. Those 3 lines of code were all I could see that was different other than removing the percentage codes, of course.

Please disregard previous message


Poster: annasue
Dated: Sunday August 28 2005 - 21:16:43 BST

It was operator error on my part. I appreciate so much your help, as always!


Poster: Ruth
Dated: Sunday August 28 2005 - 21:41:33 BST

Hi,

I suggest you take out the top and left positions. The menu is relative positioned because it's in the table and top and left have no meaning. I don't know that there is a problem with those in there, but I would bet that some browser out there will decide to be confused by the position = relative and the top and left = included. :lol:

Ruth