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 trialWilliam Davis
2,324 PointsHTML not invoking style sheet in browser view.
I'm working on an independent project in Notepad++ as I follow the lessons. But when I open the HTML in the browser, the style sheet I've made does not have its effects applied. The file path is correct, nothing is misspelled, and I've been able to apply the same properties in the HTML itself and have them show up in the browser. Really at a loss as to why they don't connect, I thought it might be a Notepad++ issue but I don't know.
<head>
<meta charset=βutf-8β>
<title>The Wonderful World of Stuff</title>
<link rel=βstylesheetβ href="css/style.css">
</head>
* {
background-color: red;
}
2 Answers
Kenan Memis
47,314 PointsHi William,
I just tried this code in Notepad++ and works perfect:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>The Wonderful World of Stuff</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<p>AAAA</p>
</body>
</html>
Cisco Rendon
Courses Plus Student 37,546 PointsWilliam,
try removing the "css" from href="css/style.css." It needs to read the file labeled style.css, according to the way it was written out, the href is looking for a folder named css not the style sheet. See if that may work for you
William Davis
2,324 PointsI've got it in that folder though, the style sheet is inside it.