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 trial

CSS CSS Basics (2014) Getting Started with CSS External Style Sheets

DIANNE SCHRIMSHER
DIANNE SCHRIMSHER
2,397 Points

My style sheet doesn't seem to be linking to my html file.

I followed the video and have rechecked my code and the style sheet doesn't seem to be linking to the html file when I refresh the browser.

Here is the code to my index file and style.css

<!DOCTYPE html>
<html>
  <head>
    <title>Lake Tahoe</title>
    <link rel="stylesheet" href="css/style.css">
  </head>
  <body> 
    <header>
      <span>Journey through the Sierra Nevada Mountains</span>
      <h1>Lake Tahoe, California</h1>
    </header>
    <p>
      Lake Tahoe is one of the most breathtaking attractions located in California. It's home to a number of ski resorts, summer outdoor recreation, and tourist attractions. Snow and skiing are a significant part of the area's reputation.
    </p>
    <a href="#">Find out more</a>
  </body>
</html>

body {
  text-align: center;
}

h1 {
  font-size: 72px;
  color: white;   
}

header {
  background-color: orange:
}

p {
  font-size: 20px;
}

Also, the text-align, color, background-color, etc are all highlighted in red in my workspace

Vittorio Somaschini
Vittorio Somaschini
33,371 Points

Hello DIanne.

I have edited your question for readability. Please have a quick look here for future reference: https://teamtreehouse.com/forum/posting-code-to-the-forum

3 Answers

Obaa Cobby
Obaa Cobby
9,337 Points

It could be the folder structuring is not right. Make sure your html file is in the root folder. So that it can access the css file in the "css folder". I hope this will help.

DIANNE SCHRIMSHER
DIANNE SCHRIMSHER
2,397 Points

It looks exactly like the the video External Style Sheets at the 1:15 mark. I still can't get it to work. I followed everything step by step on my workspace.

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Well, let's check some basics then. Make sure you've saved your file and refreshed the page in the browser. If that still fails, try clearing the browser cache and then refreshing the page. But if that also fails, we're going to need to see the file/directory structure. This is most easily accomplished by linking a snapshot of your workspace to us! :sparkles:

DIANNE SCHRIMSHER
DIANNE SCHRIMSHER
2,397 Points

I did it.....not sure it was the best solution, but it worked. I saved everything, cleared my cache (I assume that means delete history and cookies, right?) and then refreshed my browser, but still nothing. Then I looked at my saved workspaces and noticed that I might have more than one workspace dedicated to that assignment. Deleted all of the seemingly extra workspaces, nothing. Deleted ALL my saved workspaces and started from scratch, step by step, and it worked!