i've created css menu , submenu using style sheet. code , style sheet follows
<style type="text/css"> *{ padding:0px; margin:0px; } #navdiv { border: 1px solid black; text-align:center; background:#ff0000; border-radius: 10px; width: 50%; margin: 10px; } nav ul ul { display:none; width:auto; } nav ul li:hover >ul { display:block; } nav ul { background: #ff0000; padding: 0px; border-radius: 0px; list-style: none; position: relative; display: inline-table; font-size: 12px; font-family:verdana, arial, helvetica, sans-serif; font-weight: bold; text-transform:uppercase; } nav ul li { float:left; background: #ff0000; border: 0px solid black; } nav ul li:hover { background: #dddddd; } nav ul li { display:block; padding: 10px 25px; text-decoration: none; color:#ffffff; } nav ul li:hover { color:#000000; } nav ul ul { background: #ff0000; position: absolute; top: 100%; } nav ul ul li { float: none; border: 1px solid #000000; position: relative; color:#ffffff; } nav ul ul li { background-color: #ffffff; color: #ffffff; } nav ul ul li a:hover { background: #000000; color:#ffffff; } nav ul ul ul { position: absolute; left: 100%; top:0; } </style> <div id="navdiv"> <nav> <ul> <li><a href="#">home</a></li> <li><a href="#">tutorials</a> <ul> <li><a href="#">photoshop</a></li> <li><a href="#">illustrator</a></li> <li><a href="#">web design</a> <ul> <li><a href="#">html</a></li> <li><a href="#">css</a></li> </ul> </li> </ul> </li> <li><a href="#">articles</a> <ul> <li><a href="#">web design</a></li> <li><a href="#">user experience</a></li> </ul> </li> <li><a href="#">inspiration</a></li> </ul> </nav> </div>
i want change color of submenu (i.e photoshop, illustrator, web design in example) i'm able change background color using css
nav ul ul li { background-color: #ffffff; color: #ffffff; }
but i'm not getting why font color not getting change? please me problem
try add a:visited
instead of css selector.
nav ul ul li a, nav ul ul li a:visited
Comments
Post a Comment