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

Right Align Table with Form Element


Poster: penanco
Dated: Monday November 19 2007 - 17:23:50 GMT

I am attempting to right align a menu but running into problems with a <textarea> field in one of the submenus. I have set up my menu to work within a table structure as explained in the "Relative Positioning - Putting the Menu in Table/Div Example" Topic. I have also set openstyle=forceleft. The menu aligns great for normal text link submenus. The problem is with a Feedback submenu where I have placed a <textarea> form field. That submenu will not align properly with the parent. It is possible to use a <textarea> field in the menu when right aligning it? I would appreciate any help.

http://www.comeandpray.org/menu/index.htm

menu_data.js
Code:
fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;
buildAfterLoad=true;

with(menuStyle=new mm_style()){
styleid=1;
bordercolor="#ffffff";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="8pt";
fontstyle="normal";
fontweight="bold";
headerbgcolor="#ffffff";
headercolor="#000000";
imagepadding=6;
offbgcolor="#1B2C85";
offcolor="#ffffff";
onbgcolor="#CC6600";
oncolor="#ffffff";
padding=6;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#ffffff";
separatorsize=1;
}

with(submenuStyle=new mm_style()){
bordercolor="#ffffff";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="8pt";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#5871B3";
offcolor="#ffffff";
onbgcolor="#DC9B5B";
oncolor="#ffffff";
padding=4;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#758CC9";
separatorsize=1;
subimagepadding=2;
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
orientation="horizontal";
style=menuStyle;
position="relative";
aI("text=Home;url=http://www.milonic.com/;");
aI("showmenu=Support;text=Support;");
aI("showmenu=Feedback;text=Feedback;");
aI("showmenu=Logout;text=Logout;");
}

with(milonic=new menuname("Support")){
margin=7;
style=submenuStyle;
openstyle="forceleft";
aI("text=Menu Link 1;url=http://www.domain.com/;");
aI("text=Menu Link 2;url=http://www.domain.com/;");
aI("text=Menu Link 3;url=http://www.domain.com/;");
}

with(milonic=new menuname("Feedback")){
margin=7;
style=submenuStyle;
openstyle="forceleft";
aI("text=`From: firstname lastname &nbsp;&nbsp;To: admin &nbsp;&nbsp;Date: date<br /><form style='margin:0px;' name=input action=><textarea name=feedback style='width:300px;height:50px'></textarea><br /><div align=right><input type=submit value=Submit name=submit></div></form>`;type=form;");
}

drawMenus();



index.htm
Code:
<table cellpadding="0" cellspacing="0" border="0" align="right">
<tr><td>
<script type="text/javascript" src="milonic_src.js"></script>   
<script type="text/javascript" src="mmenudom.js"></script>
<script type="text/javascript" src="menu_data.js"></script>   
</td></tr>
</table>

Re: Right Align Table with Form Element


Poster: Ruth
Dated: Monday November 19 2007 - 18:50:36 GMT

Hi,

Well, the problem is the interaction of the forceleft, the placement of the menu at the extreme right of the page and the automatic detection in the menu that keeps submenus from opening off the screen :)

So, you can either put in ignoreCollisions=true; up at the top area where the fixMozilla and offsets are, and I don't know if that will cause any other problems, though it doesn't seem to do that, or you can remove the forceleft and let the built in detection stop it from going off the right side of the screen which puts the submenu directly below the main menu, almost as if it is centered. Again, I don't know what would happen at various resolutions, you'll need to test that and to test different browsers.

Ruth

Re: Right Align Table with Form Element


Poster: penanco
Dated: Monday November 19 2007 - 19:04:04 GMT

Thanks Ruth... that worked great!