Search code examples
htmlcssstylesheet

Why is my CSS style sheet not applying to my HTML document?


I think I did everything right. The site is robotichive3774.com if you want to see a tangible version of the website. I am making this site for my school robotics team. Obviously I am an amateur so any other tips would be fantastic.

Thanks

<!DOCTYPE html>
<html>
<head>

<link rel="stylesheet" type="text/css" href="index_style.css">

</head>
<body>
<div class="navbar">
<ul class="nav">
  <li><a href="/Home">Home</a></li>
  <li><a href="/Team Bio">Team Bio</a></li>
  <li><a href="/Our Robot">Our Robot</a></li>
  <li><a href="/Our Coach">Our Coach</a></li>
  <li><a href="/Gallery">Gallery</a></li>
  <li><a href="/Outreach">Outreach</a></li>
  <li><a href="/Youtube">Youtube</a></li>
</ul>
</div>

</body>
</html>

CSS Code

li  
{
float: left;
display:inline-block;
}

.nav 
{
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden; 
min-width: 1350px;  
}

a:link, a:visited 
{
display:inline-block;
width: 182.2px;
padding-top: 12px;
padding-right: 5px;
padding-bottom: 12px;
padding-left: 5px;
font-weight: bold;
color: #FFFFFF;
background-color: #990000; 
text-align: center;
text-decoration: none;
}

a:hover, a:active 
{
background-color: #B20000;
}

Solution

  • The directive is

    <link rel="stylesheet"
    

    not

    <link rel="style sheet"
    

    Documentation: http://www.w3.org/TR/html401/present/styles.html#h-14.3.2