Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3432306
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T07:25:58+00:00 2026-05-18T07:25:58+00:00

I am developing a HTML static site. I done everything almost. Finally, I need

  • 0

I am developing a HTML static site. I done everything almost. Finally, I need to have dropdown menu. I tried to add some extra code to have dropdown menu. But, it is affecting my existing style. Please, someone help to modify my piece of code to have a dropmenu.

Code:
http://www.jsfiddle.net/mohamedsaligh/mkYrt/

Help indeed.

Thanks 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T07:25:59+00:00Added an answer on May 18, 2026 at 7:25 am

    here is your code edited. It is a start and not a 100% but have up to 4 tiers. http://www.jsfiddle.net/JaLnp/1/

    the javascript is for the Internet Explorers that can not handle the css :hover command outside a link.


    CSS

    /* menu setup */
    #menu, #menu ul {
        padding: 0px;
        margin: 0px;
        list-style: none;
    }
    
    #menu a {
        display: block;
        text-decoration:none;
        width: auto;
        color:#ffffff;
        background-color: #790808;
    }
    
    #menu li {
        margin-right: 2.5px;
        margin-left: 2.5px;
        padding:5px;
        float: left;
        width: auto;
        color:#ffffff;
        background-color: #790808;
    }
    
    /* first level of menu drop down */
    #menu li ul {
        position: absolute;
        width: 150px;
        left: -999em;
    }
    
    #menu li:hover ul {
        left: auto;
        color:#ffffff;
        background-color: #790808;
    }
    
    #menu li:hover ul, #menu li.sfhover ul {
        left: auto;
        color:#ffffff;
        background-color: #790808;
    }
    
    #menu li ul ul {
        margin: -1em 0 0 85px;
        color:#ffffff;
        background-color: #790808;
    }
    
    #menu, #menu ul {
        padding: 0;
        margin: 0;
        list-style: none; 
        line-height: 1;
        color:#ffffff;
        background-color: #790808;
    }
    
    /* second level of menu drop down */
    #menu li:hover ul ul, #menu li.sfhover ul ul {
        left: -999em;
        color:#ffffff;
        background-color: #790808;
    }
    
    #menu li:hover ul, #menu li li:hover ul, #menu li.sfhover ul, #menu li li.sfhover ul {
        left: auto;
        color:#ffffff;
        background-color: #790808;
    }
    
    /* third level of menu drop down */
    #menu li:hover ul ul, #menu li:hover ul ul ul, #menu li.sfhover ul ul, #menu li.sfhover ul ul ul {
        left: -999em;
        color:#ffffff;
        background-color: #790808;
    }
    
    #menu li:hover ul, #menu li li:hover ul, #menu li li li:hover ul, #menu li.sfhover ul, #menu li li.sfhover ul, #menu li li li.sfhover ul {
        left: auto;
        color:#ffffff;
        background-color: #790808;
    }
    
    /* forth level of menu drop down */
    #menu li:hover ul ul, #menu li:hover ul ul ul, #menu li:hover ul ul ul ul, #menu li.sfhover ul ul, #menu li.sfhover ul ul ul, #menu li.sfhover ul ul ul ul {
        left: -999em;
        color:#ffffff;
        background-color: #790808;
    }
    
    #menu li:hover ul, #menu li li:hover ul, #menu li li li:hover ul, #menu li li li li:hover ul, #menu li.sfhover ul, #menu li li.sfhover ul, #menu li li li.sfhover ul, #menu li li li li.sfhover ul {
        left: auto;
        color:#ffffff;
        background-color: #790808;
    }
    

    Javascript

    // drop down list functionality for Internet Explore
    // IE does not support the :hover in anything but links
    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);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.