<!DOCTYPE html> <!-- Fig. 4.17: dropdown.html --> <!-- CSS drop-down menu. --> <html> <head> <meta charset = "utf-8"> <title> Drop-Down Menu </title> <style type = "text/css"> body { font-family: arial, sans-serif } nav { font-weight: bold; color: white; border: 2px solid RoyalBlue; text-align: center; width: 10em; background-color: RoyalBlue; } nav ul { display: none; list-style: none; margin: 0; padding: 0; } nav:hover ul { display: block; } nav ul li { border-top: 2px solid RoyalBlue; background-color: white; width: 10em; color: black; } nav ul li:hover { background-color: PowderBlue; } a { text-decoration: none; } </style> </head> <body> <nav>Menu <ul> <li><a href = "#">Home</a></li> <li><a href = "#">News</a></li> <li><a href = "#">Articles</a></li> <li><a href = "#">Blog</a></li> <li><a href = "#">Contact</a></li> </ul> </nav> </body> </html> <!-- ************************************************************************** * (C) Copyright 1992-2012 by Deitel & Associates, Inc. and * * Pearson Education, Inc. All Rights Reserved. * * * * DISCLAIMER: The authors and publisher of this book have used their * * best efforts in preparing the book. These efforts include the * * development, research, and testing of the theories and programs * * to determine their effectiveness. The authors and publisher make * * no warranty of any kind, expressed or implied, with regard to these * * programs or to the documentation contained in these books. The authors * * and publisher shall not be liable in any event for incidental or * * consequential damages in connection with, or arising out of, the * * furnishing, performance, or use of these programs. * ************************************************************************** -->