CSS For Cascading Menu Error


/ Published in: CSS
Save to your folder(s)

Stylesheet in need of fixing.


Copy this code and paste it in your HTML
  1. /* Style Sheet for CasMenu.html */
  2.  
  3.  
  4.  
  5. *{
  6. margin:0;padding:0;border:0; /* -- reset code -- */
  7. }
  8.  
  9. body {
  10. font-family: verdana;
  11. background-color: #ABC;
  12. margin: 2% auto;
  13. width: 70%;
  14. clear: both;
  15. }
  16.  
  17. h2 {
  18. color: #111;
  19. text-align: center;
  20. background-color: #DDDEEE;
  21. border: 2px solid #ABFDBD;
  22. border-radius: 5px;
  23. margin-bottom: 50px;
  24. }
  25.  
  26. /* Menu-behaviour styling */
  27.  
  28. ul {
  29. list-style-type: none;
  30. }
  31.  
  32. ul#navmenu li {
  33. width:20%;
  34. text-align: center;
  35. position:relative;
  36. float: left;
  37. }
  38.  
  39. ul#navmenu a {
  40. text-decoration: none;
  41. display: block;
  42. height: 30px;
  43. line-height: 30px;
  44. background-color: #FFF;
  45. border: 1px solid #000;
  46. border-radius: 6px;
  47. }
  48.  
  49. ul#navmenu .sublvl1 a{
  50. margin-top: 5px;
  51. }
  52.  
  53. ul#navmenu .sublvl2 a{
  54. margin-left: 5px;
  55. margin-right: -5px;
  56. }
  57.  
  58. ul#navmenu li:hover > a {
  59. background-color: #CFC;
  60. }
  61.  
  62. ul#navmenu li:hover > a:hover {
  63. background-color: #CC0;
  64. }
  65.  
  66. ul#navmenu ul.sublvl1 {
  67. width: 500%;
  68. display: block;
  69. position: relative;
  70. }
  71.  
  72. ul#navmenu ul.sublvl2 {
  73. width: 500%;
  74. display: block;
  75. position: absolute;
  76. /*top: 0; Enough overlap already!!
  77. left: 100px; */
  78. }
  79. /* remove after you get it to work!!!!!
  80. ul#navmenu li:hover .sublvl1 {
  81. display: block;
  82. }
  83.  
  84. ul#navmenu .sublvl1 li:hover .sublvl2 {
  85. display: block;
  86. }*/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.