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

HTML Accessibility Websites CSS: Part 1

Micah Dunson
Micah Dunson
34,368 Points

Why can't I link my CSS page to my widget page? I've never had any problem understanding the course so far

For some reason I can't get the CSS to link to my html. I'm following along with the video and everything works perfect until I go to refresh after "adding" my very first page styling of background color to the widget page. Nothing happens for me. I've tried different ways but nothing seems to work. So far this is the first time I've been stumped. Not sure what I'm doing wrong.

4 Answers

jase richards
jase richards
10,379 Points

Post you code by checking out the markdown cheatsheet down below.

Make sure your location of the files are relative

Micah Dunson
Micah Dunson
34,368 Points

Not sure if it will fix the problem but there is a missing semi-colon ( : ) after the margin property in your CSS rule for the body element.

Daniel Politz
Daniel Politz
6,338 Points

Thanks Micah! I figured out that it was my file paths were not set up correctly but thanks for the help.

Daniel Politz
Daniel Politz
6,338 Points

I am having the same problem. I have the files in the same location. For some reason the changes are not occurring. Hopefully this provides enough information to help me solve this.

<!doctype>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>Widget, Inc.</title>
  <link rel="stylesheet" type="text/css" href="style.css">
</head>
<body> 
    <div id="wrapper">
      <div id="header">
         <h1>Widget</h1>
         <ul id="nav">
            <li><a href="daniel.html">Home</a></li>
            <li><a href="#">Product</a></li>
            <li><a href="#">Company</a></li>
            <li><a href="#">Blog</a></li>
         </ul>
       </div>
body { 
     margin 0;
     font-family: verdana, sans-serif;
     font-size: 0.85em;
     background: #eac657;   
 }