bazz
08-15-2005, 01:41 PM
Hi,
I have used Suckerfishes dd menu with 6 levels and whilst it works, the css isn't quite perfect. (Only checked in FF as I haven't begun the hacks for IE yet).
I would appreciate a tip on how to make the last list, to flyout, to display the ul at the full width of the longest item. Fromn the source code below, you should see that the last item proturdes beyond the background until you hover it.
I have tried a few css changes but I am out of ideas now.
Please help.
bazz
opps better add the source code :)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Suckerfish Dropdowns - Three Level Bones</title>
<style type="text/css">
body {
font-family: arial, helvetica, serif;
}
#mainDD {
font-fanily : "Arial", verdana, sans-serif, helvetica;
background-color : #940031;
width : 100%;
height : 25px;
text-align : left;
}
#nav, #nav ul { /* all lists */
padding: 0px;
margin: 0;
list-style: none;
line-height: 1;
color: #eeeeee;
}
#nav a {
display: block;
width: 10em;
color : #aaaaaa;
}
#nav a:link, #nav a:visited, #nav a:active, #nav a:hover {
color : #aaaaaa;
text-decoration : none;
background : #940031;
/*font-size : 0.95em;*/
width : 100%;
}
#nav li { /* all list items */
float: left;
width: 7em; /* width needed or else Opera goes nuts */
/*background : #940031; /* THIS IS THE CSS FOR THE TITLE LINKS */*/
}
#nav li ul { /* second-level lists */
position: absolute;
line-height : 20px;
width: 7em;
left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */
background : #940031;
}
#nav li ul ul { /* third-and-above-level lists */
margin: -1em 0 0 7em;
left : -999em;
background : #940031;
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul, #nav li:hover ul ul ul ul ul, #nav li:hover ul ul ul ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul, #nav li.sfhover ul ul ul ul, #nav li.sfhover ul ul ul ul ul, #nav li.sfhover ul ul ul ul ul ul {
left: -999em; /* added by me */
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul, #nav li li li li li:hover ul, #nav li li li li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul, #nav li li li li.sfhover ul, #nav li li li li li.sfhover ul, #nav li li li li li li.sfhover ul { /* lists nested under hovered list items */
left : auto;
top : 25px;
}
#nav li li li li li li:hover a, #nav li li li li li li.sfhover a {
padding : 0 25px 0 0 ;
}
#content {
clear: left;
color: #ccc;
}
</style>
<script type="text/javascript"><!--//--><![CDATA[//><!--
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);
//--><!]]></script>
</head>
<body>
<div id="control_panel_index_pages">
<div id="mainDD">
<ul id="nav">
<li>
Accommodation
<ul>
<li>
Antrim
<ul>
<li>
<a href="3Star">3Star</a>
<ul>
<li>
<a href="#>town</a>
<ul>
<li>
Hotel
<ul>
<li>
<a href="#">businessname</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
county
<ul>
<li>
<a href="#">star rating</a>
<ul>
<li>
<a href="town"></a>
<ul>
<li>
Guesthouse
<ul>
<li>
<a href="#">buisinessname</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href=""></a>
<ul>
<li>
Guesthouse
<ul>
<li>
<a href="#">business name</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="null">null</a>
<ul>
<li>
<a href="Bangor">Bangor</a>
<ul>
<li>
BnB
<ul>
<li>
<a href="">businessname</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
Attraction
<ul>
<li>
Down
<ul>
<li>
<a href="Monument">Monument</a>
<ul>
<li>
<a href="Newtownards">Newtownards</a>
<ul>
<li>
Historic
<ul>
<li>
<a href="#">name</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</body></html>
I have used Suckerfishes dd menu with 6 levels and whilst it works, the css isn't quite perfect. (Only checked in FF as I haven't begun the hacks for IE yet).
I would appreciate a tip on how to make the last list, to flyout, to display the ul at the full width of the longest item. Fromn the source code below, you should see that the last item proturdes beyond the background until you hover it.
I have tried a few css changes but I am out of ideas now.
Please help.
bazz
opps better add the source code :)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<title>Suckerfish Dropdowns - Three Level Bones</title>
<style type="text/css">
body {
font-family: arial, helvetica, serif;
}
#mainDD {
font-fanily : "Arial", verdana, sans-serif, helvetica;
background-color : #940031;
width : 100%;
height : 25px;
text-align : left;
}
#nav, #nav ul { /* all lists */
padding: 0px;
margin: 0;
list-style: none;
line-height: 1;
color: #eeeeee;
}
#nav a {
display: block;
width: 10em;
color : #aaaaaa;
}
#nav a:link, #nav a:visited, #nav a:active, #nav a:hover {
color : #aaaaaa;
text-decoration : none;
background : #940031;
/*font-size : 0.95em;*/
width : 100%;
}
#nav li { /* all list items */
float: left;
width: 7em; /* width needed or else Opera goes nuts */
/*background : #940031; /* THIS IS THE CSS FOR THE TITLE LINKS */*/
}
#nav li ul { /* second-level lists */
position: absolute;
line-height : 20px;
width: 7em;
left: -999em; /* using left instead of display to hide menus because display: none isn't read by screen readers */
background : #940031;
}
#nav li ul ul { /* third-and-above-level lists */
margin: -1em 0 0 7em;
left : -999em;
background : #940031;
}
#nav li:hover ul ul, #nav li:hover ul ul ul, #nav li:hover ul ul ul ul, #nav li:hover ul ul ul ul ul, #nav li:hover ul ul ul ul ul ul, #nav li.sfhover ul ul, #nav li.sfhover ul ul ul, #nav li.sfhover ul ul ul ul, #nav li.sfhover ul ul ul ul ul, #nav li.sfhover ul ul ul ul ul ul {
left: -999em; /* added by me */
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul, #nav li li li li li:hover ul, #nav li li li li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul, #nav li li li li.sfhover ul, #nav li li li li li.sfhover ul, #nav li li li li li li.sfhover ul { /* lists nested under hovered list items */
left : auto;
top : 25px;
}
#nav li li li li li li:hover a, #nav li li li li li li.sfhover a {
padding : 0 25px 0 0 ;
}
#content {
clear: left;
color: #ccc;
}
</style>
<script type="text/javascript"><!--//--><![CDATA[//><!--
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);
//--><!]]></script>
</head>
<body>
<div id="control_panel_index_pages">
<div id="mainDD">
<ul id="nav">
<li>
Accommodation
<ul>
<li>
Antrim
<ul>
<li>
<a href="3Star">3Star</a>
<ul>
<li>
<a href="#>town</a>
<ul>
<li>
Hotel
<ul>
<li>
<a href="#">businessname</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
county
<ul>
<li>
<a href="#">star rating</a>
<ul>
<li>
<a href="town"></a>
<ul>
<li>
Guesthouse
<ul>
<li>
<a href="#">buisinessname</a>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href=""></a>
<ul>
<li>
Guesthouse
<ul>
<li>
<a href="#">business name</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
<a href="null">null</a>
<ul>
<li>
<a href="Bangor">Bangor</a>
<ul>
<li>
BnB
<ul>
<li>
<a href="">businessname</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li>
Attraction
<ul>
<li>
Down
<ul>
<li>
<a href="Monument">Monument</a>
<ul>
<li>
<a href="Newtownards">Newtownards</a>
<ul>
<li>
Historic
<ul>
<li>
<a href="#">name</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</body></html>