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:37
Trouble aligning menu 2 the right in tables in firefox/opera
Poster: bmaplenut
Dated: Saturday April 14 2007 - 4:07:07 BST
Hi,
I have problems aligning "hmenu" to the right in a table cell in firefox/opera.
Menu Version : 5.772
These are the codes
html code:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="JavaScript" type="text/javascript" src="/script/function.js"></script>
<script language="JavaScript" type="text/javascript" src="/script/menu_data.js"></script>
<!-- TemplateBeginEditable name="doctitle" -->
<title>MapleNut</title>
<!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<link href="/css/layout.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table class="table1">
<tr>
<td colspan="2" class="hmenu"><script language="JavaScript" type="text/javascript" src="/script/hmenu.js"></script></td>
</tr>
<tr>
<td rowspan="2" class="vmenu"><script type="text/javascript" src="/script/vmenu.js"></script></td>
<td class="content"><script language="JavaScript" type="text/javascript" src="/script/rantip.js"></script>
<script language="JavaScript" type="text/javascript" src="/script/breadcrumb.js"></script>
<!-- TemplateBeginEditable name="main" -->
<h1>Head</h1>
<br />
<div id="content">Content for id "content" Goes Here</div>
<!-- TemplateEndEditable --></td>
</tr>
<tr>
<td class="timeupdated"><!-- TemplateBeginEditable name="time" -->Last Updated : GMT+8 :
<!-- #BeginDate format:fcAm1a -->Saturday, April 14, 2007 11:00 AM<!-- #EndDate -->
<!-- TemplateEndEditable --></td>
</tr>
<script language="JavaScript" type="text/javascript" src="/script/footer.js"></script>
</table>
<div id="clock">
<script language="JavaScript" type="text/javascript" src="/script/time.js"></script>
</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script language="JavaScript" type="text/javascript" src="/script/function.js"></script>
<script language="JavaScript" type="text/javascript" src="/script/menu_data.js"></script>
<!-- TemplateBeginEditable name="doctitle" -->
<title>MapleNut</title>
<!-- TemplateEndEditable --><!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable -->
<link href="/css/layout.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table class="table1">
<tr>
<td colspan="2" class="hmenu"><script language="JavaScript" type="text/javascript" src="/script/hmenu.js"></script></td>
</tr>
<tr>
<td rowspan="2" class="vmenu"><script type="text/javascript" src="/script/vmenu.js"></script></td>
<td class="content"><script language="JavaScript" type="text/javascript" src="/script/rantip.js"></script>
<script language="JavaScript" type="text/javascript" src="/script/breadcrumb.js"></script>
<!-- TemplateBeginEditable name="main" -->
<h1>Head</h1>
<br />
<div id="content">Content for id "content" Goes Here</div>
<!-- TemplateEndEditable --></td>
</tr>
<tr>
<td class="timeupdated"><!-- TemplateBeginEditable name="time" -->Last Updated : GMT+8 :
<!-- #BeginDate format:fcAm1a -->Saturday, April 14, 2007 11:00 AM<!-- #EndDate -->
<!-- TemplateEndEditable --></td>
</tr>
<script language="JavaScript" type="text/javascript" src="/script/footer.js"></script>
</table>
<div id="clock">
<script language="JavaScript" type="text/javascript" src="/script/time.js"></script>
</div>
</body>
</html>
Javascript code
Code:
fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=0;
_menuOpenDelay=0;
_subOffsetTop=2;
_subOffsetLeft=-2;
with(hmenuStyle=new mm_style()){
bordercolor="#235";
borderstyle="solid";
borderwidth=0;
fontfamily="Verdana, Tahoma, Arial";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#235";
headercolor="#000";
offbgcolor="#235";
offcolor="#69C";
onbgcolor="#369";
oncolor="#FFF";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);";
padding=3;
pagebgcolor="#369";
pagecolor="#FFF";
separatorcolor="#2D729D";
separatorsize=1;
subimage="http://www.milonic.com/imagepack/Arrows/arrow1/white_4x5.gif";
subimagepadding=2;
}
with(new menuname("hmenu")){
style=hmenuStyle;
alwaysvisible=1;
position="relative";
orientation="horizontal";
aI("text=Home;url=/portal.html");
aI("text=Downloads;url=/download/index.html;");
aI("text=Forum;url=http://maplenut.50webs.com;target=_blank");
aI("text=Blogs;url=/blog/index.html");
aI("text=Guilds;url=/guild/index.html");
aI("text=Videos;url=/video/index.html");
aI("text=Novels;url=/novel/index.html");
aI("text=Support;url=/support/index.html;showmenu=support");
}
drawMenus();
_menuCloseDelay=0;
_menuOpenDelay=0;
_subOffsetTop=2;
_subOffsetLeft=-2;
with(hmenuStyle=new mm_style()){
bordercolor="#235";
borderstyle="solid";
borderwidth=0;
fontfamily="Verdana, Tahoma, Arial";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#235";
headercolor="#000";
offbgcolor="#235";
offcolor="#69C";
onbgcolor="#369";
oncolor="#FFF";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);";
padding=3;
pagebgcolor="#369";
pagecolor="#FFF";
separatorcolor="#2D729D";
separatorsize=1;
subimage="http://www.milonic.com/imagepack/Arrows/arrow1/white_4x5.gif";
subimagepadding=2;
}
with(new menuname("hmenu")){
style=hmenuStyle;
alwaysvisible=1;
position="relative";
orientation="horizontal";
aI("text=Home;url=/portal.html");
aI("text=Downloads;url=/download/index.html;");
aI("text=Forum;url=http://maplenut.50webs.com;target=_blank");
aI("text=Blogs;url=/blog/index.html");
aI("text=Guilds;url=/guild/index.html");
aI("text=Videos;url=/video/index.html");
aI("text=Novels;url=/novel/index.html");
aI("text=Support;url=/support/index.html;showmenu=support");
}
drawMenus();
CSS
Code:
.hmenu {
background-color: #235;
text-align: right;
padding-right: 1mm;
}
background-color: #235;
text-align: right;
padding-right: 1mm;
}
I look forward to your reply.
Thanks,
Isaac Chng[/code]
Poster: Ruth
Dated: Saturday April 14 2007 - 7:25:21 BST
Hi,
I'm not able to get it to the right either using the method I usually use which is to put a table in that cell which only has one cell in it and align the table right, but that's not working.
I did find one solution, make this your hmenu
Code:
with(new menuname("hmenu")){
style=hmenuStyle;
alwaysvisible=1;
position="relative";
orientation="horizontal";
menuwidth='100%';
menualign='right';
style=hmenuStyle;
alwaysvisible=1;
position="relative";
orientation="horizontal";
menuwidth='100%';
menualign='right';
what this does is make the 'menu' in which the items are contained 100% of the table cell, then the menualign='right'; shifts those items inside the 100% span to the right side.
Ruth