Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2007

    Drop down navigation menu...

    Hey guys,

    I am having a bit of trouble. I want to build a navigation table that some of the links you click on, will bring a "sub menu" that will slide down below the link, in categories.

    Basically I want it to look something like this.

    --2005-2010Mustang Parts
    --1996-2005 DOHC Mustang Parts
    --1996-2004 SOHC Mustang Parts
    -Contact Us
    -About Us

    Something like that, this is a shorten version though.

    How I have it setup right now (without the sub menus)

    -Contact Us
    -About Us

    I have an index template/page that I am using
    Code to pull the navigation table. In the nav.html tile, it's just a basic list with div's

    <div id="sidebar" >                
                <ul class="sidemenu">
                    <li><a href="index.html">home</a></li>
                    <li><a href="products">products</a></li>
                    <li><a href="services">services</a></li>
                    <li><a href="aboutus">about us</a></li>
                    <li><a href="contact">contact</a></li>    
                    <li><a href="policies">policies</a></li>
                    <li><a href="racing">racing</a></li>
                    <li><a href="videos">videos</a></li>
                    <li><a href="gallery">gallery</a></li>
                    <li><a href="forums">forums</a></li>                                    
    Now I've attempted to get some javascript to work on this. What I've done is, in the index.php file place the information in the header section (to call the javascript file) then in the nav.html file I put in the code needed. It simply doesn't work this way as I've learned. Is there some other way to get this to work the way I need it to? I'm a little lost here.

    Thanks in advance for any advice!

  2. #2
    Join Date
    Aug 2007
    Well I've figured out a cheater way to do it, using multiple nav.html documents.

    Basically what I have done is when a link that needs a submenu is clicked, it'll go to a page that's the "main" page for the category but call a custom nav.html file this time that's got a sub menu under it.

    Really wish there was an easier way to define this all in one file, but I suppose this will do for now.

  3. #3
    Join Date
    Mar 2005
    You will want to do this in CSS and not JavaScript (my opinion). Take a look at this link of search results or even suckerfish CSS gives a good tutorial and needed code examples etc. I also found this online tool to get you started

Similar Threads

  1. Need php navigation menu
    By crazylane in forum Programming Discussion
    Replies: 4
    Last Post: 06-16-2009, 08:29 AM
  2. Navigation Menu?
    By @Matt in forum Web Design and Content
    Replies: 1
    Last Post: 09-16-2008, 09:56 PM
  3. Navigation Menu - How do I do this?
    By ridesign in forum Web Design and Content
    Replies: 8
    Last Post: 02-07-2008, 10:50 AM
  4. Navigation drop down menu help
    By spiderfine in forum Web Design and Content
    Replies: 0
    Last Post: 03-23-2005, 03:49 PM
  5. Drop Down Navigation
    By croakingtoad in forum Programming Discussion
    Replies: 6
    Last Post: 11-09-2003, 02:44 PM

Posting Permissions

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