Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New Coder
    Join Date
    Feb 2005
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need help with adding drop down menu to top nagivation bar

    Hi,

    I'd like to create a drop down menu as part of my current navigation.Example: Sports Articles would be the main page and clickable as a link.
    Once you place mouse over the link called sports articles, a drop down sub menu would appear taking you to subcategories for that main link.

    Listed below is my CSS coding for my navigation:

    /******** TOP NAVIGATION *************/
    #top_nav
    {
    border: 1px solid #336699;
    border-left: none;
    border-right: none;
    background-color: #3fbf7f;
    text-align: left;
    font-size: 12px;
    font-weight: bold;
    padding: 0px;
    margin: 0;
    font-family: Verdana, arial, sans-serif;
    }

    #top_nav li
    {
    display: inline;
    list-style-type: none;
    padding: 0;
    margin: 0;
    }

    #top_nav ul
    {
    padding-top: 4px;
    padding-bottom: 4px;
    margin: 0 0 0 0px;
    }

    ul#navlist
    {
    margin-left: 0;
    padding-left: 0;
    white-space: nowrap;
    }

    #navlist li
    {
    display: inline;
    list-style-type: none;
    }

    #navlist a
    {
    padding-top: 4px;
    padding-bottom: 4px;
    padding-right: 10px;
    padding-left: 10px;
    }

    #navlist a:link, #navlist a:visited
    {
    text-decoration: none;
    color: #ffffff;
    }

    #navlist a:hover
    {
    color: #fff;
    background-color: #2e68a2;
    }


    Here is my coding for the navigation itself:

    <div id="top_nav">
    <ul id="navlist"><li><a href="http://www.raz-sports.com/articles">spor... Blogs & Articles</a></li>
    <li><a href="http://www.raz-sports.com/sports-forums"... Forums</a></li>

    <li><a href="http://www.raz-sports.com/sports-web-dir... Directory</a></li>
    </ul></div>

    Just not sure how to do a dop down menu for each link(on the nagivation bar) using ONLY CSS. I don't want to use javascripting.


 

Posting Permissions

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