I am stuck on something that seems very simple but I must be missing some minor detail.
I have this div:
<div id="menu" class="menu_div">
<a href="/">HOME</a> |
<a href="/pics.php">PICTURES</a>
</div>
And the following inside the style tags
.menu_div {
background-color: #FFFFFF;
border:1px solid black;
width: 900px;
a:link {color:#000000; text-decoration:none;} /* unvisited link */
a:visited {color:#000000; text-decoration:none;} /* visited link */
a:hover {color:#FF0000; text-decoration:none;} /* mouse over link */
a:active {color:#FF0000; text-decoration:none;} /* selected link */
}
Everything works except the links. I tried other combinations like .menu_div a:hover etc, nothing seems to work, any idea why?
Thanks
I don’t see any SASS or LESS tags, so here is the solution – you can’t have nested rules in CSS. You must define them separately: