I'm trying to position my xml menus inside absolutely positioned DIV tags.
Return to Recent Questions
Q:
I'm trying to position my menus inside absolutely positioned <DIV> tags. If
the <DIV> tag has style="position:absolute; top:100px; left:50px;" in the
actual tag, deluxe-menu seems to work correctly. If I have the
"position:absolute; top:100px; left:50px;" in a <STYLE> tag or a linked
stylesheet and applied using id or class selectors, then deluxe-menu does
not work correctly: sub menus have a 100pixel offset in the y direction and
a 50 pixel offset in the x direction. This is with no change to the .js data
file (I have absolutePos=0;)
Is this a known issue, and is it planned to be fixed?
A:
See, the problem is that the script can't get css properties of the object if they are described in separate .css block (or file).
In other words, you can't get the value of "position" attribute of the object if the object doesn't have this property within inline style
(style="position:absolute"). To get the value you should move .css style into style="" attribute.
Please, try to add your
css file -> inline css, for example:
For example, you should add style="position:absolute;"
to the
<DIV id=head>
So, you'll have:
<DIV id=head style="position:absolute;">
Now we have only such solution for this problem.
We'll try to fix this problem in the future versions.
Return to Recent Questions
|