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 trialJane Marianne Filipiak
7,444 PointsSame Problem! Cannot apply CSS styling to my html page.
Hello out there. I am following Guil's 'Type Selectors' CSS tutorial. I typed the html into one file of Notepad text editor. I saved in as 'index.html'. I typed CSS into another file of Notepad text editor. I saved it as 'style.css'. I put both these files into a folder named CSS. When I open the html in a browser, refresh the page, the CSS styling is not applied. What is causing this problem? Regards
4 Answers
Carah Burrell
575 PointsHave you linked your html to your css page? http://stackoverflow.com/questions/17623033/how-can-i-link-my-css-file-with-my-html-in-sublimetext-2
Phillip 25A
4,963 PointsDid you check to see if the path of the CSS file is correct in the HTML? If they are not in the same folder you need to specify the path.
Sebastian Mercado
8,800 PointsYou have to link your CSS style sheet to your HTML document.
Put this into the head section of your HTML document:
<link rel="stylesheet" type="text/css" href="css/style.css">
I would also recommend not putting your index.html document in your CSS folder.
Jane Marianne Filipiak
7,444 PointsThank you all for your helpful replies.