Forum Moderators: not2easy

Message Too Old, No Replies

Vertical Menu running off images

         

anthony88guy

2:28 pm on May 29, 2005 (gmt 0)

10+ Year Member



I've been searching google for some time now, I am giving up. All I want is a simple drop down when you hover over an image. Can anyone point me in the right direction? Thanks

createErrorMsg

3:21 pm on May 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1. Search "suckerfish dropdowns" (the match will be either an ALA or HTMLDog url).
2. Read the article.
3. Search "son of suckerfish dropdowns" (ibid).
4. Read the article.
5. Adapt to your image-based application.
6. Post any specific questions you have here.

Good luck. :)

cEM

anthony88guy

4:51 pm on May 29, 2005 (gmt 0)

10+ Year Member



Well I tried the best I can, here is my code.

CSS

#nav, #nav ul {padding: 0;margin: 0;list-style: none;}
#nav a {display: block;width: 10em;}
#nav li {float: left;width: 10em;}
#nav li ul {position: absolute;width: 10em;left: -999em;}

#nav li:hover img.tools {left: auto;}
#nav li:hover img.tools, #nav li.sfhover img.tools {left: auto;}

Javascript

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);

IMG

<img class="tools" src="images/tools.jpg" name="tools" width="58" height="27" border="0">

Somone please get me out of this hole.

createErrorMsg

8:24 pm on May 29, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Somone please get me out of this hole.

anthony, we would love to, but we need a little more to go on. For one, we need to know what the hole your in IS. What, exactly, is the question? What's wrong? What is the code you posted doing or not doing that is problematic for you?

Two, we'll need to see the rest of your HTML markup for the menu in order to troubleshoot it.

cEM