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 trialOtto Mejia
744 PointsMy styles won't apply when I refresh my page in the browser.
I'm going through the exercise Getting Started with CSS, and I'm doing the part where I'm supposed style the paragraphs and header with inline styles, which works perfectly. But when I want to style them externally in the styles.css file and refresh the browser, it doesn't work.
It's as if the browser only recognizes the index.html and not the styles.css. I'v already tried redownloading the exercise files and nothing changes.
5 Answers
Romain Gaget
24,449 PointsAre you sure you linked you css file correctly at the top of you html?
Romain Gaget
24,449 Pointstry css/styles.css
Otto Mejia
744 PointsNothing. The exercise says css/style.css, so theres no changing it. I tried it, but it didn't do anything.
Romain Gaget
24,449 Pointstry "stylesheet" href="css/style.css"(you misspelled stylesheet)
Otto Mejia
744 PointsI corrected the spelling on stylesheet. Now what.
jeremie singler
4,569 PointsTry
<link rel="stylesheet" href="css/style.css">
In the head of your index.html file Best regards
Tomasz Kusior
Courses Plus Student 740 PointsThe href is pointing to the wrong file location. Find styles.css in the folder and right click>Properties> and copy the location of the file.
For example my location is C:\Users\tom\Desktop\Treehouse\getting-started-with-css (1)\adding-css-to-page\start\style.css
My link looks like this:
<link rel="stylesheet" href="C:\Users\tom\Desktop\Treehouse\getting-started-with-css (1)\adding-css-to-page\start\styles.css">
Otto Mejia
744 PointsOtto Mejia
744 PointsYes, here I have the rel attribute along with everything else to communicate the files.