Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Mon Jul 25, 2005 1:52 am
It really shouldn't be case sensitive. Not totally sure what's going on there.
Content management as it is meant to be
https://forum.cmsmadesimple.org/
1.1.5 works perfect for my menu structure - Thanks !!!ljbadenz wrote: I fixed it, but unfortunately the class="sectionheader" doesn't exist at the moment so you cant apply custom formatting to section headers. I'll look into a work around... I suppose I could hard code the styling into a style="" property...
Greg that css looks promising. I emailed the author of the original ALA article for his take on a horizontal stylesheet, so if he can't help I might be able to modify your code to suit.
Technicaly the JavaScript is not required. If you you are using a mozilla based browser then it should work fine without it. But IE's poor CSS implementation requires the use of JavaScript.iNSiPiD wrote: We really need to can any solution that relies on JavaScript to work, particularly when this code could be replaced by server-side scripting.
The Suckerfish Dropdowns are not working well on my old school IE5. However, this is very close to what we need, I think.Greg wrote: What about the horizontal and vertical menu here
It is based on the Suckerfish Dropdowns article by Patrick Griffiths and Dan Webb at A List Apart.
Shouldn't we stick to Nick Rigby's vertical CSS code? But just try too tweak the Suckerfish horizontal CSS to match Nick's perfection?wishy wrote: I just tried the horizontal code that Greg posted. It kind of works, but definatly needs some tweaking...
I emailed him on Monday and replied same day quoting him:It would just be great if we could get Nick to help us, he is a CSS God:P
So hopfully he be able to do it and we can finally delete phplayers from our lives.Somebody else had already approached me about this! I will try and put something together for you later today and send it on.
Code: Select all
#primary-nav, #primary-nav ul { /* all lists */
padding: 0;
margin: 0;
list-style: none;
line-height: 21px;
width: auto;
}
#primary-nav a {
display: block;
width: 107px;
background-color: #000000;
border-left: 1px solid #000000;
border-bottom: 1px solid #000000;
color: #ffffff;
font-size: 11px;
font-weight: normal;
text-align: center;
}
#primary-nav a:hover {background-color: #336699;}
#primary-nav li { /* all list items */
float: left;
width: 107px; /* width needed or else Opera goes nuts */
}
#primary-nav li ul { /* second-level lists */
border-right: 1px solid #000000;
position: absolute;
width: 107px;
left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */
}
#primary-nav li ul ul { /* third-and-above-level lists */
position: absolute;
border-right: 1px solid #000000;
margin: -22px 0 0 107px;
}
#primary-nav li:hover ul ul, #primary-nav li:hover ul ul ul, #primary-nav li.sfhover ul ul, #primary-nav li.sfhover ul ul ul {
left: -999em;
}
#primary-nav li:hover ul, #primary-nav li li:hover ul, #primary-nav li li li:hover ul, #primary-nav li.sfhover ul, #primary-nav li li.sfhover ul, #primary-nav li li li.sfhover ul { /* lists nested under hovered list items */
left: auto;
}
Good job, works and looks great in Firefox, but doesn't work with my IE5?Wolliholiker wrote: Try that css in combination with the CSSMenu for a nice horizontal dropdown- not perfect yet, but i think its not far away from what most of you are searching for...
Its based on the suckerfish code... http://www.htmldog.com/articles/suckerfish/dropdowns/
Tested it with IE 5 and 6, Opera 7 and 8 - all worked fine...
hmm - worked fine in my IE 5.0 tested it now also with Firefox 1.06 and netscape 7.01Redguy wrote: Good job, works and looks great in Firefox, but doesn't work with my IE5?
Code: Select all
sfHover = function() {
var sfEls = document.getElementById("primary-nav").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 (window.attachEvent) window.attachEvent("onload", sfHover);