Pseucodo help

Discussion in 'CSS' started by agentwazakashi, Apr 28, 2010.

  1. #1
    I am new to css and is trying the two level menu. But it seems the a:hover on list is not working? Any helps will be appreciated.


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>


    <style>

    ul.block1{

    background: #F00;



    width:100px;
    list-style-type:none;

    }


    ul.block1 a:hover <--- why this is not working?
    {
    color:#0F0;

    }

    ul.block1 a:link
    {
    color: #FF0;


    }


    ul.block1 li ul#submenu
    {

    display:none;

    }



    ul.block1 li:hover ul#submenu

    {
    display:block;

    }


    </style>

    <body>
    <div class="container">
    <ul class="block1">
    <li><a href="#b">test</a>

    <ul id="submenu">

    <li> <a href="#k"> try</a></li>
    <li> <a href="#k"> try </a></li>

    </ul>

    </li>
    </ul>

    </div>
    </body>
    </html>
     
    agentwazakashi, Apr 28, 2010 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Add this,
    ul.block1 li a:hover
    {
    color: #fff

    }
     
    radiant_luv, Apr 28, 2010 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    I have already answered this here. It is not polite to post a question to multiple forums. It causes multiple people to waste their time when it's already been answered.

    gary
     
    kk5st, Apr 28, 2010 IP