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?
The rules as you have them, will only apply within a
navelement, except this:This rule applies to
a:linkanda:visited. You want this: