Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Jack Cummins
17,417 PointsMy about.html page isn't linking to my style.css page.
Would you please help me to get them to connect.
style.css:
/***********************
FIRST PAGE
************************/
#nav {
font-family: 'Kanit', sans-serif;
color:red;
list-style: none;
font-weight: bold;
width: 100%;
text-align: center;
background-color: black;
height:800px;
overflow:hidden;
margin-right:2%;
}
a {
color:red;
text-decoration:none;
}
li {
font-size:50px;
}
li{
margin-bottom:250px;
}
/**************
Universal
***************/
.wrapper{
}
.container{
}
/***********************************************
coding.html
***********************************************/
/**************
Media Queries
***************/
@media (min-width:800px){
.not-showing{
display:none;
}
}
@media (max-width:800px){
.not-showin{
display:none;
}
}
@media (min-height:800px){
#nav{
height:775px;
}
}
@media (min-height:965px){
#nav{
height:900px;
}
}
@media (min-height:1150px){
#nav{
height:1100px;
}
}
@media (min-height:1350px){
#nav{
height:1300px;
}
li{
margin-bottom:350px;
}
/*****************************
about.html
******************************/
about.html:
<!DOCTYPE html>
<html>
<head>
<head>
<link rel="stylesheet" href="CSS/style.css">
<link href="https://fonts.googleapis.com/css?family=Changa|Kanit|Martel|Martel+Sans" rel="stylesheet">
</head>
</head>
<body>
I am in 5th grade and have a <span class="hap">lot</span> of different interists. These interists consist of <a href="math.html">Math</a>, <a href="coding.html" id="link-1">Coding</a>, <a href="tennis.html">Tennis</a>, and a lot more!
</body>
</html>
2 Answers
jeffrey bachynski
5,179 PointsIt worked for me. Check the file path to make sure that style.css is in a folder called CSS on the same level as the about.html file.
Jack Cummins
17,417 PointsWhat do you mean by "the same level"?
jeffrey bachynski
5,179 PointsI mean the same level in your directory tree. At the moment, the about.html file is looking inside of the folder that where about.html is, for another folder called "CSS". Then it looks in the CSS folder for a file called style.css. If either of those don't exist, the file can not be found and the style.css can not be found so it won't load.
You can try putting the files into the same folder and removing CSS/ from the path, so it can do a simpler reference using href="style.css". Save the html file, and then check it out. I have made that mistake before a few times. Hopefully that helps.