nav ul {
}
nav ul li {
margin-left: 7px;
}
nav.ul li a, a:link, a:visited {
float: left;
padding: 7px;
margin-left: 15px;
color: #ffffff;
text-decoration: none;
font-weight: bold;
}
nav ul li a:hover {
}
I only want the code above to style the elements within the <nav></nav>
Now however it does as well style the <a href=""> outside the nav element. How can I make sure it does what I want?
nav.ul li a, a:link, a:visiteddoesn't inherit. Should be:nav.ul li a, nav.ul li a:link, nav.ul li a:visited..(or subclass) is wrong and being perpetrated in most of the answers.