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>
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