I expanded the function that fixes the hover event for IE to also adjust
the marginTops when an item wraps to a second line. Works for IE &
Mozilla (Netscape/Firefox), but not for Opera. ...may as well see what
the deal is with that too.
sfHover = function() {
var sfEls =
document.getElementById("verMenu").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
this.className+=" sfhover";
}
sfEls[i].onmouseout=function() {
this.className=this.className.replace(new
RegExp(" sfhover\\b"), "");
}
if (document.all){
if (sfEls[i].childNodes.length > 2) {
if ((sfEls[i].childNodes[0].innerHTML.length > 18) &&
(sfEls[i].childNodes[2].className == "level2")) {
sfEls[i].childNodes[2].style.marginTop = '-2.5em';
}
if ((sfEls[i].childNodes[0].innerHTML.length > 26) &&
(sfEls[i].childNodes[2].className == "level3")) {
sfEls[i].childNodes[2].style.marginTop = '-3.1em';
}
}
} else {
if (sfEls[i].childNodes.length > 3){
if ((sfEls[i].childNodes[1].innerHTML.length > 18) &&
(sfEls[i].childNodes[3].className == "level2")) {
sfEls[i].childNodes[3].style.marginTop = '-2.5em';
}
if ((sfEls[i].childNodes[1].innerHTML.length > 26) &&
(sfEls[i].childNodes[3].className == "level3")) {
sfEls[i].childNodes[3].style.marginTop = '-3.1em';
}
}
}
}
}
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 20, 2005 9:38 AM
To: [email protected]
Subject: Re: [magnolia-user] [magnolia-dev] JasperException - Unable to
load tag handler class
> I don't think there is much we can do about the offset from the top
when there are line wraps.
Javascript can adjust the marginTop's for the submenus that wrap two
lines. For some reason, my level3 menus require more correction.
----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------