menu in <div> tags

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
hulleric
Advanced
Advanced
Posts: 16
Joined: Tue Nov 04, 2003 9:17 pm

menu in <div> tags

Post by hulleric »

Here is the code. I am traying to get the menu to be set inside these tags. I can't even see the menu when I view the page. Any ideas?

<BODY>
<DIV class=roundedBox>
<DIV class=boxCorners><IMG class=boxLeft height=15
src="images/top_left.gif" width=15><IMG height=15
src="images/top_right.gif" width=15></DIV>
<DIV class=boxContent style3 style1>
<SCRIPT language=JavaScript src="../menu/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=../menu/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=../menu/mmenudom.js><\/scr"+"ipt>");
</script>

<SCRIPT language=JavaScript src="../menu/menu_data.js" type=text/javascript></SCRIPT>

<div align="center">This is where the menu should go. I can't seem to get it to go here.
</div>
</DIV>
<DIV class=boxCorners><IMG class=boxLeft height=15
src="images/bottom_left.gif" width=15><IMG height=15
src="images/bottom_right.gif"
width=15></DIV>
</DIV>
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

The menu is not happy inside of <div>. Since you can really place the menu wherever you want using its built-in parameters, there's no reason for a <div>.
John
jshep@magma.ca
Beginner
Beginner
Posts: 4
Joined: Mon Sep 15, 2003 5:51 pm
Location: Ottawa, Canada
Contact:

Menu in <DIV>

Post by jshep@magma.ca »

I have a similar problem using a relative position <DIV> using something similar to the sample 4. I can see the menu(s) but they are offset but the same top and left offsets as the DIV in which they are contained. Is there a work-around to make the menu :happy"?

JIm
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

The workaround is don't put the menu in a <div>. It messes up the layers the menu already contains.
John
fulmer
Super Advanced
Super Advanced
Posts: 39
Joined: Mon Dec 08, 2003 9:00 am
Location: Hachioji, Japan
Contact:

Post by fulmer »

I am currently using the menu inside of the <div>

Actually, I've got 3 <div> on that page. I did run into the problem with the popups not showing. I changed the order of the <div> in my html

bad example:
<div id="jmenudiv" align="left" style="position: absolute; left: 0px; top: 0px; width: 132px; height: 100%;">
<SCRIPT language=JavaScript src="/path/to/menu_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/path/to/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/path/to/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="/path/to/menu_data.js" type=text/javascript></SCRIPT>
</div>

<div id="maindiv" align="right" style="position: absolute; left: 132px; top: 0px; height: 100%;">
<iframe src="http://my.page.com" name="mainiframe" width="100%" height="100%" frameborder="0" scrolling=auto>
[Your user agent does not support frames or is currently configured not to display frames. However, you may visit the <a href="http://my.page.com/realpage">real page.</a>]
</iframe>
</div>

<div id="iewarn" align="left" style="position: absolute; left: 5px; top: 20px; width: 195px; height: 150px; visibility: hidden;">
<table border="0" cellspacing="0" cellpadding="5" style="border: 1 solid #366999">
<tr>
<td><small><small><font color="#003063">お使いのブラウザーは古いバージョンです。現在の標準はIE5.5ですので、インストーラよりアップデートして下さい。ただし、アップデート後PCの再起動が必要になりますので、お時間(30分程度)のある時に実施して下さい。</font></small></small></td>
</tr>
</table>
</div>


good example:
<div id="maindiv" align="right" style="position: absolute; left: 132px; top: 0px; height: 100%;">
<iframe src="http://my.page.com" name="mainiframe" width="100%" height="100%" frameborder="0" scrolling=auto>
[Your user agent does not support frames or is currently configured not to display frames. However, you may visit the <a href="http://my.page.com/realpage">real page.</a>]
</iframe>
</div>

<div id="jmenudiv" align="left" style="position: absolute; left: 0px; top: 0px; width: 132px; height: 100%;">
<SCRIPT language=JavaScript src="/path/to/menu_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/path/to/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/path/to/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="/path/to/menu_data.js" type=text/javascript></SCRIPT>
</div>

<div id="iewarn" align="left" style="position: absolute; left: 5px; top: 20px; width: 195px; height: 150px; visibility: hidden;">
<table border="0" cellspacing="0" cellpadding="5" style="border: 1 solid #366999">
<tr>
<td><small><small><font color="#003063">お使いのブラウザーは古いバージョンです。現在の標準はIE5.5ですので、インストーラよりアップデートして下さい。ただし、アップデート後PCの再起動が必要になりますので、お時間(30分程度)のある時に実施して下さい。</font></small></small></td>
</tr>
</table>
</div>
Post Reply