Firefox Positioning

A

Andre

Hi,

I need help with something's working in one of my app, but not in
another.

I have a MENU, and on MouseOver i display a DIV on the Page, but in
Firefox, the DIV is always at the LEFT (0px) of the page.. even with this
code, did someone have any idea ?

The Menu
------------------
<table width="600" border="0" cellspacing="0" cellpadding="0"
style="position:static;background-image: url(Menu/top_bg.jpg);">
<tr>
<td class="section" id="pacs" align="CENTER"
onmouseover="menu(this,'menuB');" >PACS</td>
<td class="section" id="cinema" align="CENTER"
onmouseover="menu(this,'menuA');">CINEMA</td>
</tr>
</table>

<div id="menuA" style="z-index:20;display: none; background-color:
#FBBD38;">
HELLO
</div>

<div id="menuB" style="z-index:20;display: none; background-color:
#FBBD38;">
RE_HELLO
</div>


Positioning
---------------------------
function menu(obj,objMenu) {
document.getElementById(objMenu).style.left=900;
document.getElementById(objMenu).style.position='absolute';
document.getElementById(objMenu).style.display='block';
}


Thank you
 
J

jshanman

Andre said:
Hi,

I need help with something's working in one of my app, but not in
another.

I have a MENU, and on MouseOver i display a DIV on the Page, but in
Firefox, the DIV is always at the LEFT (0px) of the page.. even with this
code, did someone have any idea ?

The Menu
------------------
<table width="600" border="0" cellspacing="0" cellpadding="0"
style="position:static;background-image: url(Menu/top_bg.jpg);">
<tr>
<td class="section" id="pacs" align="CENTER"
onmouseover="menu(this,'menuB');" >PACS</td>
<td class="section" id="cinema" align="CENTER"
onmouseover="menu(this,'menuA');">CINEMA</td>
</tr>
</table>

<div id="menuA" style="z-index:20;display: none; background-color:
#FBBD38;">
HELLO
</div>

<div id="menuB" style="z-index:20;display: none; background-color:
#FBBD38;">
RE_HELLO
</div>


Positioning
---------------------------
function menu(obj,objMenu) {
document.getElementById(objMenu).style.left=900;
document.getElementById(objMenu).style.position='absolute';
document.getElementById(objMenu).style.display='block';
}


Thank you

Try:
document.getElementById(objMenu).style.left=900+"px";

- JS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top