www.webdeveloper.com
Results 1 to 3 of 3

Thread: suckerfish menu IE?

  1. #1
    Join Date
    Sep 2006
    Posts
    375

    suckerfish menu IE?

    Hi,

    q1)I did a suckerfish menu copied and altered from the hot dog site. It works in FF but not in IE as all i get is the links but no dropdown as in FireFox. I really hate this when IE fails . I put all the css/JS between the head tag.

    q2)I can't move the menu to the right without problems as i set a margin on #headlinks2 and the links get cluttered?

    #headlinks2 {
    height:25px;
    }

    #headlinks2 a {
    color:green;

    display: block;
    text-decoration:none;
    width: 100px;
    font-size:13pt;
    padding-right:5px;
    //margin-left:205px;
    }

    #headlinks2 a:hover {
    color: white;


    }

    #headlinks2, #headlinks2 ul {
    padding: 0;
    margin: 0;
    list-style: none;
    }

    #headlinks2 li {
    float: left;
    width: 100px;
    }

    #headlinks2 li ul {
    position: absolute;
    width: 100px;
    left: -999em;
    }

    #headlinks2 li:hover ul {
    left: auto;

    }

    #headlinks2 li:hover ul, #headlinks2 li.sfhover ul {
    left: auto;

    }
    </style>
    <script type="text/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);

    </script>

    //html

    <div id="headlinks2">


    <li><a href="#">Percoidei</a>
    <ul>
    <li><a href="#">Remoras</a></li>
    <li><a href="#">Tilefishes</a></li>
    <li><a href="#">Bluefishes</a></li>

    </ul>
    </li>

    <li><a href="#">Anabant</a>
    <ul>
    <li><a href="#">Climbing perches</a></li>
    <li><a href="#">Labyrinthfishes</a></li>
    <li><a href="#">mex</a></li>

    </ul>
    </li>

    <li><a href="#">Percoidei</a>
    <ul>
    <li><a href="#">Remoras</a></li>
    <li><a href="#">Tilefishes</a></li>
    <li><a href="#">Bluefishes</a></li>

    </ul>
    </li>
    <li><a href="#">Anabant</a>
    <ul>
    <li><a href="#">Climbing perches</a></li>
    <li><a href="#">Labyrinthfishes</a></li>
    <li><a href="#">mex</a></li>

    </ul>
    </li>

    <li><a href="#">Percoidei</a>
    <ul>
    <li><a href="#">Remoras</a></li>
    <li><a href="#">Tilefishes</a></li>
    <li><a href="#">Bluefishes</a></li>

    </ul>
    </li>
    <!-- etc. -->



    </div>

  2. #2
    Join Date
    Jan 2005
    Location
    Frankfort, KY, USA
    Posts
    6,167
    IE isn't failing. Your coding is incorrect, causing the javascript (on which IE relies because it does not support li:hover) not to function.
    You are missing the first <ul> tag in your code. It should be named "nav," or replace the name "nav" in your javascript with "headlinks2" or whatever div name you want.

    <ul id="headlinks2"> or change the "nav" to "headlinks" in the javascript
    FYI
    * My screen resolution is set at 1680x1050
    * I'm accessing your site through a T1 line
    * I'm probably viewing it using Firefox (unless browser is specified)

  3. #3
    Join Date
    Sep 2006
    Posts
    375
    Hi,

    I actually changed all this before posting so that isn't a problem.
    What i want to do is just move the menu to the right and do i use float:right as that fails or do i use a margin/padding as this only moves part of it?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles