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


Venkatesh K
Venkatesh K
Courses Plus Student 4,238 Points

unable to link style sheet even after providing perfect path

I have created my own style and HTML sheet for practise based on my fav.show:HIMYM; I am unable to link my style sheet with HTML. Path is perfect. My link statement: <link href=“CSS/style.css” rel=“stylesheet”>

my style sheet: html{ background:#483D8B; }

body{ margin: 0 auto; max-width: 800px; }

img { width: 100%; }

.barney { display:block; margin: 300px 0 100px 0; padding: 0; }

.lilly { display:block; margin: 250 px 0 50px 0; padding: 0; }

a { background: transparent; border: 0; display: block; float: left; margin: 0; outline: 0; padding: 0; width: 33%; }

To add on I'am not able to see even my images

Kindly take time to answer!


4 Answers

on line 7 you had your href and link ref reversed. change it to this:

<link rel="stylesheet" href="CSS/style.css">

as far as your pictures go, i just redid the line and got them to populate :

<img src="pics/bs.png" class="barney" alt="bs">
<img src="pics/lilly.png" class="lilly" alt="lilly">

all seems to be working with these changes

Venkatesh K
Venkatesh K
Courses Plus Student 4,238 Points

Nope! Same problem continues! No pics to popup and style sheet not getting linked

it works on my system. what are you using as an editor ?

I am using Komodo Edit on a Mac ..(its free)

try to avoid Text Based Editors unless they do syntax highlighting. or a designed for coding. they can introduce hidden things that cause problems.


here are the revised changes give it a try. Its working fine on my side

make sure to double check your case sensitivity. I see you have CSS/style.css in CAPS. make sure the folder path is named exactly as the folder. relative paths are case sensitive!

Venkatesh K
Venkatesh K
Courses Plus Student 4,238 Points

"Check" The folder name is in CAPS! still unable to do it

can you provide a link to where this is stored ? either in a workspace or live on the web ??

Karolin Rafalski
Karolin Rafalski
11,368 Points

have you tried

<link href=“./CSS/style.css” rel=“stylesheet”>


<link href=“/CSS/style.css” rel=“stylesheet”>