xcoderx Posted April 21, 2010 Share Posted April 21, 2010 hey guys why is the font color not changing in the selected menu class? where am i goin wrong? it is showing the active link color but not the one i want it to show. hover is goin ok #menu ul li a { display: block; float: left; height: 30px; width: 70px; margin-right: 1px; text-decoration: none; font-size: 1.1em; font-weight: bold; color: #7BE0A9; padding-top: 15px; text-align: center; } #menu li a:hover { color:#1478CB; background: url(images/menu_h.gif) repeat-x; } #menu li.selected{ background: url(images/menu_s.gif) repeat-x; font-weight:bold; color:#1478CB; } Link to comment https://forums.phpfreaks.com/topic/199307-selected-menu-font-color-issue/ Share on other sites More sharing options...
haku Posted April 22, 2010 Share Posted April 22, 2010 You have a higher specificity on the initial <a> tag declaration that you do on the .selected declaration, so the .selected declaration will never work. Change it from this: #menu li.selected{ to this #menu ul li.selected a{ Link to comment https://forums.phpfreaks.com/topic/199307-selected-menu-font-color-issue/#findComment-1046190 Share on other sites More sharing options...
xcoderx Posted April 22, 2010 Author Share Posted April 22, 2010 thanks sooooo much bro i was actually missing the <a> althou i tried #menu ul li.selected{ Link to comment https://forums.phpfreaks.com/topic/199307-selected-menu-font-color-issue/#findComment-1046294 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.