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!
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

Esteban Ruseler
1,686 PointsPlease help. Trying to move from local host to FTP server - wrong HTML code
I have a website ready to go but I cant FTP it. The index (HTML) loads fine but the CSS isn't loading.
In my local host I had
<link rel="stylesheet" href="file://localhost/Users/esteban/Documents/z/style.css" type="text/css" media="screen">
So I've changed it to
<link rel="stylesheet" href="style.css" type="text/css" media="screen">
But it doesnt work, I've also tried href="file://style.css"
I know this is probably a silly question but it's so frustrating to be falling over the last hurdle.
If anyone can help, I'd be really grateful :)
5 Answers

Graham Saunders
2,683 PointsMake sure the css is in your root director (The same one your index.html is in) and also make sure it's included in the <head> element of your document.

John Wheal
27,969 PointsYou don't need the file:// part of the link.
Just use href="style.css". This will work as long as the css is in the same folder as index.html

Esteban Ruseler
1,686 PointsJohn Wheal That's what I thought. I had the css style, normalise, grid.css all in the same "level" but then what worked was putting it all in a file folder and uploading that. Thanks for your help :)

James Barnett
39,199 Points>
what worked was putting it all in a file folder
As your website grows you'll want to organize your images, CSS & HTML into separate folders. Here's a tutorial where you can read more about how to organize your files

Esteban Ruseler
1,686 PointsGraham Saunders Thank you so much. I basically had to create a file folder and upload that to the server. So it worked, my first website is live :))

Esteban Ruseler
1,686 PointsJames Barnett Thanks for this, I found it really useful.
(Apologies for the delayed response. I was travelling.)