treehouse : what would you like to learn today?
Web Design Web Development iOS Development

CSS MENU TALKING

  • I am looking for a menu similair to this one: http://css-tricks.com/examples/MenuFader/

    But when you hover about the link you should see the content not only when you click on it(like the menu css-tricks.com got)
    Does anyone got a tutorial for this?

    grtz eXo
  • Try'd it out myself and it worked :o
    css

    a{
    text-decoration: none;
    color: black;
    }
    a span {
    visibility:hidden;
    }
    a:hover span {
    font-family: tahome;
    font-size: 16px;
    color: black;
    border: 0px;
    position:absolute;
    visibility:visible;
    }
    #menu a span {
    top: 3em;
    left: 40%;
    }
    #menu {
    margin: 5em 5em 5em 5em;
    background: #333;
    list-style: none;
    width: 100%;
    }
    #menu li {
    display: block;
    text-align: center;
    font: 67.5% \"Lucida Sans Unicode\", \"Bitstream Vera Sans\", \"Trebuchet Unicode MS\", \"Lucida Grande\", Verdana, Helvetica, sans-serif;
    line-height: 25px;
    }
    #menu a {
    background: #333;
    color: #ccc;
    width: 10em;
    height: 2.5em;
    float: left;
    text-decoration: none;
    }
    #menu a:hover {
    background: #2580a2;
    color: #fff;
    }

    html

    <ul id=\"menu\">
    <li>
    <a href=\"#\">
    Test1
    <span>test1</span>
    </a>
    </li>
    <li>
    <a href=\"#\" >
    Test2
    <span>test2</span>
    </a>
    </li>
    <li>
    <a href=\"#\" >
    Test3
    <span>test3</span>
    </a>
    </li>
    </ul>
  • hehe awesome :D