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 trialVenkatesh K
Courses Plus Student 4,238 Pointsunable 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!
Thanks
4 Answers
James R
Courses Plus Student 8,446 Pointson 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
James R
Courses Plus Student 8,446 Pointsmake 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
Courses Plus Student 4,238 Points"Check" The folder name is in CAPS! still unable to do it
James R
Courses Plus Student 8,446 Pointscan you provide a link to where this is stored ? either in a workspace or live on the web ??
Venkatesh K
Courses Plus Student 4,238 PointsHere is a drobbox link:
https://dl.dropboxusercontent.com/u/84859355/HTML%20and%20CSS.zip
Thanks for your effort James
Karolin Rafalski
11,368 Pointshave you tried
<link href=“./CSS/style.css” rel=“stylesheet”>
or
<link href=“/CSS/style.css” rel=“stylesheet”>
Venkatesh K
Courses Plus Student 4,238 PointsI did after your suggestion! doesn't help!!
Venkatesh K
Courses Plus Student 4,238 PointsVenkatesh K
Courses Plus Student 4,238 PointsNope! Same problem continues! No pics to popup and style sheet not getting linked
James R
Courses Plus Student 8,446 PointsJames R
Courses Plus Student 8,446 Pointsit works on my system. what are you using as an editor ?
Venkatesh K
Courses Plus Student 4,238 PointsVenkatesh K
Courses Plus Student 4,238 PointsSystem: Mac Editor: TextEdit
what about u??
James R
Courses Plus Student 8,446 PointsJames R
Courses Plus Student 8,446 PointsI 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.
James R
Courses Plus Student 8,446 PointsJames R
Courses Plus Student 8,446 Pointshttps://www.dropbox.com/sh/lij6e0m4uiyagcr/AABkig0dvChspkv5tf2TPzyga?dl=0
here are the revised changes give it a try. Its working fine on my side
Venkatesh K
Courses Plus Student 4,238 PointsVenkatesh K
Courses Plus Student 4,238 Pointsworks like a charm! thanks James!