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 Foundations Getting Started with CSS Adding CSS to a Page

I am having trouble getting an external style sheet to link. I have followed the instructions but cannot get css to show

I saved the CSS course to the desktop and created the style.css file into the css folder. Following the instructions exactly but cannot get the rules to apply?

Index.html is:

<!DOCTYPE html> <html> <head> <title>Adding CSS</title> <link rel"stylesheet" href="css/style.css"> </head> <body>

style.css is:

h2 { color: steelblue; padding-bottom: 10px; border-bottom: 2px dotted; }

ul { color: white; background-color: steelblue;

}

Figured out I left the = sign out between the rel and stylesheet. Thanks!

2 Answers

If your css file is into the css folder you must have this code:

<head>
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>

Dear friend just remember some steps so as to not encountering such this problems:

  1. check out the link syntax and the path
  2. check out your css rules syntax very carefully
  3. in order to debug your problem comment your css`s rules and check them one by one by removing comment from each rule good luck