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 trialSam Donald
36,305 Pointscss html linking issue!!
Hi guys, I know there have many discussions on this before but I haven't been able to find an answer that works for me.
I'm trying upload a screen shot of my problem but can't get the Markdown to work! :{ SEE BELOW
2 Answers
Elliott Frazier
Courses Plus Student 9,647 PointsYou don't need to add css/
to the beginning of your file path because that tells the browser to look in a folder called "css" for "style.css".
Connor Kuehl
4,393 PointsYou put <link ref="">
I do believe it should be <link rel="">
Using a lower case L rather than an F
Also - when linking to a file that's in the same directory, the /css
folder is not required. It should just be
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
Sam Donald
36,305 Pointsref? Now thats embarrassing......
Thanks Conner Kuehl that seems to have been the problem.
my href was correct though because while they are both in the same main directory, my css is in a subdirectory of index.html. But thanks all the same :)
Sam Donald
36,305 PointsSam Donald
36,305 PointsBoth my index.html and style.css are contained within the same directory. I tried running it in Safari and Chrome both up to date. The css is not listed in the resources section of the Developers tools in Chrome.
Here's my code, thanks.