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 trialpavz
10,309 PointsMain.css doesn't connect to my index.html
I know that there so many same questions about this topic, I've skimmed through those before writing here. Checked everything a number of times but still don't find the answer. I even tried to keep going on lessons and passed 2 more sections but as far as I don't see any changes in my main.css file to be applied, I decided to go back to the issue and actually figure out what is the problem with that. So here's my code guys:
<title>Pavel Zhestkov | Pictures</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
</head>
Here's the link to the website: http://port-80-q75smisi59.treehouse-app.com
Max Goetz
5,360 PointsHi pavelz,
That appears to by typed out correctly. I'm unable to view the website via the link provided.
Some questions I have:
1) On the sidebar of your workspace, have you moved 'main.css' to the 'css' folder? <br> 2) Is the code shown between <head> </head>?
Max
pavz
10,309 PointsJason, No it didn't.
7 Answers
Kevin Snider
Front End Web Development Techdegree Student 25,275 Pointshey pavs,
looks like your side bar css folder is named "CSS" in caps. you are calling it in your file "css/main.css" which in the coding world are two different things.
change your side bar "CSS" to "css" and it should work.
hope this helps.
pavz
10,309 PointsGOTCHA MAN!:) it works. finally....
Evgeny Rychkov
2,302 PointsHell yeah!!! IT WORKS!!! THANKS!
Jessie Yun
256 PointsWow! Thank you! :) It also worked for me!
Jessie Yun
256 PointsWow! Thank you! :) It also worked for me!
ashok bishnoi
10,160 Pointsthanks...i also resolved my problem...my css also was not linked coz i put 'Css'' in slidebar and in code i put"css ' but now i corrected that..thanks..
Charlie du Plessis
1,093 PointsThank you your comment helped me a lot
Ashley Mullins
12,544 PointsCheck your actual files located in the dark grey bar on the left side of the workspace. When I open my workspace, there is no actual file in the css folder called "main.css." This could be why it's not working because the html won't be able to link any css files that doesn't actually exist.
If that's the case, just right click on the bar, and hit "new file." Name it main.css and then drag it into the css folder. You can also create the file by clicking the file drop down menu and selecting "new file."
Do a quick test like changing the background color of the body to some ridiculous color so that you know the stylesheet is linking.
pavz
10,309 PointsThanks, but I checked it and it's not an issue, see my screenshot below.
James Tomlinson
5,076 PointsHi Pavelz
try adding a '/' before your css folder so your code would look like: href="/css/normalize.css" href="/css/main.css"
pavz
10,309 PointsDidn't work out.
Tony Pollard
5,117 PointsHi Pavelz
As far as I'm aware, you cannot share your workspace, but what would make life easier is if you are able to take a screen shot of your workspace or sidebar. As everyone suggests, it may be that you have moved your main.css file into a different directory, in which case that directory needs to be included in the path for your css file. At the moment, we are all guessing as we are unable to see what you can see. A screenshot of the sidebar would probably take a lot of the guess work out of it :) What might also be helpful is the code from your html file and the code from your main.css file so we can see if the problem is the connection to your css file or the content of your css file. Just trying to cover all bases :)
pavz
10,309 PointsHere, I uploaded the screenshot of my workspaces. http://cl.ly/image/3m1z0A240N1D
Babak Chehraz
3,355 PointsEverything you've done is correct except for the folder named "CSS". Change it to lowercase "css" and keep it there. If that doesn't work, create a new workspace project and do everything from scratch up to the part where main.css and normalize are linked and put some random code in there to test it out. If it works, compare the two and see what you did wrong. As of right now, there's nothing else that could be the problem unless you missed a </html> at the end (or something similar).
Tyrone Taylor
Courses Plus Student 11,792 Pointstry this link <link rel="stylesheet" type="text/css" href="css/main.css"> and make sure your css file has the same as the end of the link which main.css.
Jason Anello
Courses Plus Student 94,610 PointsJason Anello
Courses Plus Student 94,610 PointsHi Pavelz,
Back when you first linked "normalize.css", did it remove the bullets points in your navigation?