CSS 2-level menu

Discussion in 'CSS' started by Triexa, Apr 21, 2007.

  1. #1
    I can't quite find what I want because I don't know what it's called.

    Can anyone point me to a page with the raw CSS (cross-browser) that has the horizontal menu, and when you go over it a horizontal menu appears below it?

    Thanks
     
    Triexa, Apr 21, 2007 IP
  2. vagrant

    vagrant Peon

    Messages:
    2,284
    Likes Received:
    181
    Best Answers:
    0
    Trophy Points:
    0
    #2
    vagrant, Apr 21, 2007 IP
  3. Triexa

    Triexa Active Member

    Messages:
    580
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #3
    None of those examples are what I am looking for..

    Basically, it would be a horizontal bar... and when one hovers, that submenu appears as a horizontal bar below it...
     
    Triexa, Apr 21, 2007 IP
  4. bacanze

    bacanze Peon

    Messages:
    2,419
    Likes Received:
    127
    Best Answers:
    0
    Trophy Points:
    0
    #4
    As in a drop down menu?
     
    bacanze, Apr 21, 2007 IP
  5. Triexa

    Triexa Active Member

    Messages:
    580
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Triexa, Apr 21, 2007 IP
  6. MTbiker

    MTbiker Well-Known Member

    Messages:
    2,536
    Likes Received:
    123
    Best Answers:
    0
    Trophy Points:
    170
    #6
    MTbiker, Apr 22, 2007 IP
  7. xd2

    xd2 Peon

    Messages:
    694
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You could use javascript to change the content of a div placed under neath the navigation so when they hover over the link the sub menu links appear underneath. I beleive this would be really simple to acheive aswell.

    If you can't find anything PM me and ill have a look around for you.
     
    xd2, Apr 22, 2007 IP
  8. xd2

    xd2 Peon

    Messages:
    694
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #8
    
    <a href="#" title="link 1" onmouseover="document.all.submenu.innerHTML = '<a href=#>another link</a> | <a href=#>and another link</a>'">Link 1</a>
    <a href="#" title="link 1" onmouseover="document.all.submenu.innerHTML = 'There is no sub nav'">Link 1</a>
    <a href="#" title="link 1" onmouseover="document.all.submenu.innerHTML = '<a href=#>linkage 1</a> | <a href=#>linkage 2</a> | <a href=#>linkage 3</a>'">Link 1</a>
    <div id="submenu" style="background:#e6e6e6;">
    Select a link from above
    <div>
    
    Code (markup):
    Copy and paste that to a file and name it anything.html and see if thats what you mean, it is a very messy way of doing it and there is a more efficient code but I just wrote this off my head. Let me know.
     
    xd2, Apr 22, 2007 IP
  9. Triexa

    Triexa Active Member

    Messages:
    580
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #9
    I wanted to avoid javascript. I got it in the end though...
     
    Triexa, Apr 22, 2007 IP