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
Matt Hollis
689 Pointsarranging files for use in a html file
I was playing around with my own code in sublime text, and I got up to the part where Nick is discussing having separate CSS files and using h ref to link them. so I make up a mock CSS file to test (like he did with the background color), and I could not get it to work; I tried several different ways.... I moved the files around tried to type out their full extension and nothing, the background stayed white... In the Demo Nick is using the "workspace" so I imagine its a little different when your trying it in real life text editor or IDE but any suggestions? sorry I'll put some code in, this was the version with just the file name but there were others with the file extensions... so where am I messing up?
<!DOCTYPE html>
<html>
<head>
<meta charset ="utf-8">
<title> Matt's webpage1 </title>
<link rel="stylesheet" href="normalize.css">
<link rel="stylesheet" href="anewcss.css">
<style>
footer{
color: orange;
}
</style>
and the "anewcss.css" file was this:
body{ background-color: blue; }
1 Answer
Justin Hunter
Courses Plus Student 11,484 PointsHi Matt,
Unless your stylesheet is in the same folder as your index.html file (which it shouldn't be), you are simply missing the css/ in front of your stylesheet name in the href. So, if your stylesheet is stored in a css folder, it should be css/anewcss.css.