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 trialRyan Bergeson
4,066 PointsLinking CSS to HTML
Why does the instructor link his css file "css/style.css"?
When I do this it doesn't work but when I link mine "style.css" it does work...
4 Answers
Sheina Yeheskel
1,024 PointsHi Ryan
What is going on here is getting you ready for later stages. For a really simple site you might have your style.css in the top folder with your index.html page.
When you start making more advanced sites or themes for Wordpress or working with Foundation/Bootstrap frameworks or just doing anything with Sass/Less you definitely will need that /css/ folder.
Ryan Bergeson
4,066 PointsThank you this is more of the answer I was looking for!
Felipe Barreto
Courses Plus Student 9,604 Pointstake a look at where is your "style.css" stored at !!!
Salman Akram
Courses Plus Student 40,065 PointsHi Ryan,
If style file is in CSS folder, then we should to use right path - css/style.css. If not inside in CSS folder, then you can use just style.css. Depending on where your file located at.
<link rel="stylesheet" href="css/style.css" />
or
<link rel="stylesheet" href="style.css" />
Sheina Yeheskel
1,024 PointsI know. This one took me a while to work out - in the School of Hard Knocks.
And you will need all this stuff for today's web market.
Ryan Bergeson
4,066 PointsRyan Bergeson
4,066 PointsIt is in my CSS folder. Just seems like you wouldn't have to declare a root folder if they are both saved into the same one.