THe code I'm using now is:
In the render directory:
Code: Select all
<?php
if( ! ( strpos($content["all"],'{DROPDOWN')===false ) ) {
$content["all"] = str_replace('{DROPDOWN}', '{DROPDOWN:0}', $content["all"]);
$replace = 'build_dhtmlmenu( "$1","id=nav", 0);';
$content["all"] = preg_replace('/\{DROPDOWN:(\d+)\}/e', $replace, $content["all"]);
}
?>
in the dropdown.js in the inc_js directory:
Code: Select all
sfHover = function() {
var sfEls = document.getElementById("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);
and in the frontend.css file:
Code: Select all
/* BEGIN Menu Definitions */
#nav, #nav ul {
position: absolute;
top: 130px;
*/float: left;*/
width: auto;
list-style: none;
line-height: 1;
background-color: #496A91;
background-image: url(/img/nav_btm.gif);
background-repeat: repeat-x;
background-position: left bottom;
/* border-bottom: 1px solid #000000; */
font-weight: bold;
font-size: x-small;
* font-size: smaller;
padding: 0;
margin: 0 0 -1px 0;
* margin: -2px 0 0 0;
}
#nav a {
display: block;
width: auto;
w\idth: auto;
filter:progid:DXImageTransform.Microsoft.dropshadow(OffX=1, OffY=1, Color='black', Positive='true');
color: #FFFFFF;
text-decoration: none;
text-shadow: #000000 2px 2px 2px;
padding: 0.5em 1em;
}
#nav li.active {
background-color: #000000;
background-image:url(/img/nav_btm_hover.gif);
background-repeat: repeat-x;
background-position: left bottom;
color: #FFFFFF;
}
#nav li {
float: left;
padding: 0;
width: auto;
/* border-right: 1px solid #777777; */
}
#nav li ul {
position: absolute;
left: -999em;
height: auto;
width: 150px;
w\idth: 150px;
font-weight: bold;
* font-size: xx-small;
border: solid #777777;
border-width: 1px 0 0 1px;
margin: 0 0 0 0;
}
#nav li li {
/* padding-right: 1em; */
width: 150px;
/* border-bottom: 1px solid #222222; */
}
#nav li ul a {
width: auto;
w\idth: auto;
}
#nav li ul ul {
margin: -2.1em 0 0 150px;
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul {
left: -999em;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul {
left: auto;
}
#nav li:hover, #nav li.sfhover {
background-color: #000000;
background-image:url(/img/nav_btm_hover.gif);
background-repeat: repeat-x;
background-position: left bottom;
color: #FFFFFF;
}
/* END Menu Definitions */
Most of this is from this thread:
http://www.phpwcms.de/forum/viewtopic.php?t=5361
It still isn't behaving quite right though - see
http://www.aurabeauty.co.uk/index.php
Cheers
Mouse