473,495 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

css submenu a href problem

oll3i
679 Contributor
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
1 2229
oll3i
679 Contributor
thank you i figured it out :)
Jul 14 '08 #2

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

Similar topics

5
5832
by: Jonathan | last post by:
Hello All, I am in the process of creating a 2/3 level collapsible/exspanible menu (called "nav") where users can click on a category and have the submenus appear beneath it and so on (allow...
2
2193
by: az538 | last post by:
Hello All, I am having a problem with my menu and submenu system. It works like a champ in IE6 and Firefox but IE7 renders the submenus in incorrect positions on the page. Also, the menu system...
1
3022
by: bhosalevivek | last post by:
I did this code from Dynamic Drive DHTML. it's working properly, but now I need submenu for "Submenu 1.2", means when I take mouse on "Submenu 1.2" I need to display "Submenu 1.2.1". I try to do...
5
4083
by: remon87 | last post by:
I need some help. I have javasript that creates the submenu but it works if I have a text with css. I need it to do the same with a roll over images. so when I click on the image the submenu...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7196
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6878
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4583
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.