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 trialArthur Kakulidis
2,657 PointsCan someone please tell whats wrong here
I've been working with html and css for quite a while and started a website. After writing some code in html and linking it to my css file I didn't get any results. Here is my code.
<head>
<link rel="stylesheet" href="login.css">
<title>My Page</title>
</head>
Thanks!
MOD: I just formatted your code so it's easier for others to look through - you can find out how to do this in the Markdown Cheatsheet linked right below the text box when you're typing a question. We can get you answers faster that way! :-)
1 Answer
Louise St. Germain
19,424 PointsHi Arthur,
It's hard to tell what might not be working without seeing the whole setup, but if it's not seeing your CSS file, check the following, since these are the common culprits:
- Is the CSS file in the same folder as your HTML file? Often it is in a subfolder, so you would need a link like:
<!-- In this example, the login.css is in a different folder than the html file-->
<link rel="stylesheet" href="css/login.css">
- Is the file name correct?
- If you made changes to try to fix it, did you hit 'save'? (I know this seems stupid, but it wouldn't be the first time! :-))
If that all works out, we might have to dig a little deeper into why this isn't working! Let me know!