css - Navigation bar visited selector not changing color -
i having problems navigation bar. want show different color after link has been visited. read answer code academy, stack o/f , other sites saying "the pseudo-class_selector must follow following order work. :link :visited :hover" (codeacademy-submitted samrudhi sharma). tried this, nothing happened. i've gotten myself confused now. help. code:
#nav { width:100%; float: left; margin: 20px; padding: 0; border-top: 5.5px solid red; border-bottom: 5.5px solid red; line-height: 1.8em; display:inline-block; clear:both; } #nav ul { float: left; margin: auto; width: 1024px; margin:0px; list-style: none; } #nav ul li { color: orange; font-size:1.5em; float: left; width: 150px; padding: 0px; margin:0px; list-style:none; } #nav ul li { border-left:1px solid #fff; text-align:center; display: block; width: auto; height: 25px; text-decoration: none; } #nav ul li:visited a{ background:yellow; color:#ffffff; text-decoration:none; } #nav ul li:hover a{ background:#c60; color:#ffffff; text-decoration:none; }
place a:visited
on <a>
.
have fiddle - fiddle link! (click "run" in jsfiddle header if yellow not render.)
css
#nav li a:visited { background:yellow; color:#f00; text-decoration:none; }
Comments
Post a Comment