Page 1 of 1
Menu Issue
Posted: Fri Sep 15, 2006 2:53 am
by slloyd
I use Internet Explorer and my menu displays with just the parent section pages listed. However in Firefox, the menu, upon hover, shows the child pages (article pages within the section pages). How can I either get the child pages to show in IE, or get the child pages to NOT show in Firefox?
I'd appreciate any help anyone can give! Thanks!
Re: Menu Issue
Posted: Fri Sep 15, 2006 7:09 pm
by mrk
can you post a link to the page so we can see it in action?
Re: Menu Issue
Posted: Fri Sep 15, 2006 8:30 pm
by slloyd
Re: Menu Issue
Posted: Fri Sep 15, 2006 8:42 pm
by mrk
In IE the fly out menu needs a bit of java script to work.
Code: Select all
// Javascript for the CMS CSS Menu Module
// Copyright (c) 2005 Alexander Endresen
// Released under General Public Licence
// This script will emulate the css :hover effect on the menu elements in IE
// The variables
var cssid = "primary-nav"; // CSS ID for the menuwrapper
var menuadd = "h"; // Character to be added to the specific classes upon hovering. So for example, if this is set to "h", class "menuparent" will become "menuparenth" when hovered over.
var menuh = "menuh"; // Classname for hovering over all other menu items
if (window.attachEvent) window.attachEvent("onload", cssHover);
function cssHover() {
var sfEls = document.getElementById(cssid).getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
sfEls[i].onmouseover=function() {
if (this.className != "") {
this.className = this.className + menuadd;
}
else {
this.className = menuh;
}
}
sfEls[i].onmouseout=function() {
if (this.className == menuh) {
this.className = "";
}
else {
this.className = this.className.replace(new RegExp(menuadd + "$"), "");
}
}
}
}
copy and paste the code above and save it as CSSMenu.js then in your templates add:
Code: Select all
<!--[if IE]>
<__script__ type="text/javascript" src="http://FILE/PATH_TO/CSSMenu.js"></__script>
<![endif]-->
in the and then you flyout menu should work just fine in IE.
sugestion. Use the fly out menus on all pages so a visitor can click directly to preschool_parenting_funnies if that is where they want to go instead of having to click on pre-school parenting then having to click parenting funnies
One other sugestion... in your style sheet i would make the sub-links larger. they are hard to read at that size.
Re: Menu Issue
Posted: Sat Sep 16, 2006 2:59 am
by slloyd
Thanks for the info.
Yes, I know the text is really small. That's why I didn't even want it to appear. Any idea how to get it from not appearing? My site is going to be a network of sites and I'd prefer not to have to add javascript to every site. I'd rather just have the menu appear as it currently does in IE. But I greatly appreciate you providing the code in case I change me mind!