By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,978 Members | 1,831 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,978 IT Pros & Developers. It's quick & easy.

css submenu a href problem

oll3i
100+
P: 679
i have written css tab menu
but my links in submenu inherit the style of a href in main menu (#menu ul li a)?
when i hover over the links in submenu they do change as i want them to change they just display as #menu ul li a

Expand|Select|Wrap|Line Numbers
  1. #menu {
  2.     position:absolute;
  3.     height:auto;
  4.     width:930px;
  5.     top:10px;
  6.     left:10px;
  7.     }
  8.  
  9. #menu ul {
  10. float:left;
  11. margin:0;
  12. padding:0;
  13. list-style:none;
  14. }    
  15. #menu ul li{
  16. display:inline;
  17. }
  18.  
  19. #menu ul li a{
  20. width:80px;
  21. height:22px;
  22. float:left;
  23. display:block;
  24. margin:0 1px 0 0;
  25. font-size:100%;
  26. text-decoration:none;
  27. text-align:center;
  28. color:#FFF;
  29. font-weight:bold;
  30. background:url(../images/top_menu_normal.gif) left top no-repeat;
  31. padding:3px 0 0 0;}
  32.  
  33.  
  34.  
  35.  
  36. #menu ul li a:hover{
  37. width:80px;
  38. height:22px;
  39. float:left;
  40. display:block;
  41. text-align:center;
  42. margin-top:0;
  43. margin-right:1px;
  44. margin-bottom:0;
  45. margin-left:0;
  46. font-size:100%;
  47. text-decoration:none;
  48. color:#FFF;
  49. font-weight:bold;
  50. background:url(../images/top_menu_hover.gif) left top no-repeat;  
  51. padding:3px 0 0 0;
  52. }
  53. #menu ul li a:active{
  54. width:80px;
  55. height:22px;
  56. float:left;
  57. display:block;
  58. text-align:center;
  59. margin-top:0;
  60. margin-right:1px;
  61. margin-bottom:0;
  62. margin-left:0;
  63. font-size:100%;
  64. text-decoration:none;
  65. color:#FFF;
  66. font-weight:bold;
  67. background:url(../images/top_menu_hover.gif) left top no-repeat;  
  68. padding:3px 0 0 0;
  69. }
  70.  
  71. #menu ul #submenu{
  72. position:absolute;
  73. top:2px;
  74. left:0px;
  75. float:left;
  76. width:818px;
  77. height:10px;
  78. margin:0;
  79. padding:0;
  80. font-size:100%;
  81. }
  82.  
  83. #menu ul #submenu ul {    
  84. position:relative;
  85. margin:0;
  86. padding:0;
  87. bottom:-1.4em;
  88. left:0px;
  89. font-size:100%;
  90. width:818px;
  91. background:none;
  92. }
  93.  
  94.  
  95. #menu ul #submenu li{
  96. display:inline;
  97. list-style:none;
  98. border-right:1px solid #CCC;
  99. padding-right:2px;
  100. background:none;
  101. }
  102.  
  103.  
  104.  
  105.  
  106. #menu ul#submenu li a{
  107. text-decoration:none;
  108. color:#000;
  109. background:none;
  110. }
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117. #menu ul #submenu  li a:hover{
  118. text-decoration:none;
  119. color:#CCC;
  120. background:none;
  121. }
  122. #menu ul #submenu  li a:active{
  123. text-decoration:none;
  124. color:#CCC;
  125. background:none;
  126. }
  127.  
what should i change?
thank you
Jul 14 '08 #1
Share this Question
Share on Google+
1 Reply


oll3i
100+
P: 679
thank you i figured it out :)
Jul 14 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.