Hi!
So I’m completing some exercises with HTML and CSS and currently I’m having trouble with link states. I’m using Google Chrome and Sublime Text as the editor. I feel as though something is overriding the CSS code.
Here’s the CSS:
[code]
#nav{
border:1px solid black;
height: 50px;
width: 300px;
background-color: white;
margin: 0px auto;
}
#nav ul{
list-style-type: none;
}
#nav ul li{
border: 1px solid black;
width: 70px;
display: inline;
padding: 10px;
}
#nav ul li a: link{
text-decoration: none;
}
#nav ul li a:visited{
text-decoration: none;
color: blue;
}
#nav ul li a: hover{
text-decoration: none;
font-weight: bold;
}
#nav ul li a: active{
text-decoration: none;
}
And here’s the HTML(top portion):
[code]
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<link rel=”stylesheet” type=”text/css” href=”style.css” />
<title>Contact</title>
</head>
<body>
<h1>Contact</h1>
<div id=”nav”>
<ul>
<li><a href=”index.html”>Homepage</a></li>
<li><a href=”about.html”>About</a></li>
<li><a href=”contact.html”>Contact</a></li>
</ul>
</div>
Any help would be appreciated!
__(Added `[code]…[/code]