Board Logo

relative position child item problem
Jeffo - 6/21/2007 at 07:23 AM

This question is for the Free Tigra Menu,

I have added a couple of lines of code to make the menu relative, this works fine in firefox, menu works as you would expect it to.

But in IE6 & IE7 the child menu items become visible behind the parent items. the code to make the menu relative is below.

In the menu.js menu_item() section add the following:

document.write('<div style="position: relative;">');
document.write('</div>');


So the code should look like the sample below.


// generate item's HMTL
document.write('<div style="position: relative;">');
document.write (
'<a id="e' + o_root.n_id + '_'
+ this.n_id +'o" class="' + this.getstyle(0, 0) + '" href="' + this.a_config[1] + '"'
+ (this.a_config[2] && this.a_config[2]['tw'] ? ' target="'
+ this.a_config[2]['tw'] + '"' : '') + ' style="position: absolute; top: '
+ this.n_y + 'px; left: ' + this.n_x + 'px; width: '
+ this.getprop('width') + 'px; height: '
+ this.getprop('height') + 'px; visibility: hidden;'
+' z-index: ' + this.n_depth + ';" '
+ 'onclick="return A_MENUS[' + o_root.n_id + '].onclick('
+ this.n_id + ');" onmouseout="A_MENUS[' + o_root.n_id + '].onmouseout('
+ this.n_id + ');" onmouseover="A_MENUS[' + o_root.n_id + '].onmouseover('
+ this.n_id + ');" onmousedown="A_MENUS[' + o_root.n_id + '].onmousedown('
+ this.n_id + ');"><div id="e' + o_root.n_id + '_'
+ this.n_id +'i" class="' + this.getstyle(1, 0) + '">'
+ this.a_config[0] + "</div></a>n"
);
document.write('</div>');


Can anyone fix the child item problem in IE..?


Softcomplex: http://www.softcomplex.com/
Back to forum: http://www.softcomplex.com/forum/