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 trialRed Burke
2,677 PointsWhy isn't my .css linking to my .html?
I had the same problem as that guy, but all the answers revolve around him showing his code correctly, rather than how to link the 2.....
a {
text-decoration: none;
}
#wrapper {
max-width: 940px;
margin: 0 auto;
}
#logo {
text-align: center;
margin: 0;
}
19 Answers
Philip G
14,600 PointsOh, now i got it! You named the folder uppercase. Try this:
<link rel="stylesheet" type="text/css" href="CSS/new.css">
Philip G
14,600 PointsThe HTML has to link to the CSS, not vice versa. :) Can you post the HTML?
You can also try this:
<link rel="stylesheet" type="text/css" href="css/main.css">
Red Burke
2,677 Points<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Red G.Rick | Designer</title>
<link rel="stylesheet" href="css/normalize.css">
<link href="new.css" rel="stylesheet" type="text/css">
</head> <body> <header> <a href="index.html"> <h1>Red's Place</h1> <h2>Designer</h2> </a> <nav> <ul> <li> <a href="index.html">Portfolio</a></li> <li> <a href="about.html">About</a></li> <li> <a href="contact.html">Contact</a></li> </ul> <ol></ol> </nav> </header> <section> <ul> <li>
<a href="img/numbers-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>Experimentation with color and texture</p>
</a>
<li>
<a href="img/numbers-02.jpg">
<img src="img/numbers-02.jpg" alt="">
<p>Playing with blends in photoshop</p>
</a> <li>
<a href="img/numbers-06.jpg">
<img src="img/numbers-06.jpg" alt="">
<p>trying to create 80's styles of glow</p>
</a>
<li>
<a href="img/numbers-09.jpg">
<img src="img/numbers-09.jpg" alt="">
<p>Drips created using Photoshop brushes</p>
</a>
<li>
<a href="img/numbers-12.jpg">
<img src="img/numbers-12.jpg" alt="">
<p>Creating shapes using repetition</p>
</a>
</li>
</ul>
</section>
<footer>
<a href="http://twitter.com/nickrp"><img src="img/twitter-wrap.png" alt="Twitter Logo"></a>
<a href="https://myspace.com/berbarkhan"><img src="img/myspace.jpeg" alt="Myspace Logo"></a>
<p>© 2014 Red G.Rick</p>
</footer>
</body>
</html>
Red Burke
2,677 Pointsalso tried
'''<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Red G.Rick | Designer</title>
<link rel="stylesheet" href="css/normalize.css">
<link href="new.css" rel="stylesheet">
'''
and
'''
'''<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> Red G.Rick | Designer</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href=css/new.css">
'''
Red Burke
2,677 Points'''<html>
<head>
<meta charset="utf-8">
<title> Red G.Rick | Designer</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" type="text/css" href="new.css">
</head> <body>'''
Philip G
14,600 PointsWhy do you link to new.CSS in stead of main.CSS?
Have you got a link for us?
Red Burke
2,677 Pointsnew is what i called the file. in one forum the person fixed the issue by renameing the file, so I tried that as well.
Philip G
14,600 PointsDo you have a live testing URL? Maybe you can paste it at jsfiddle.net or upload it to a ftp?
Red Burke
2,677 Pointswould code bloacks be a LT URL?
Philip G
14,600 PointsYes, maybe. Please post it here. What is Code Blocks? An IDE?
Red Burke
2,677 PointsPost what? I'm not sure how to use jsfiddle, I just plugged the code in there though, and it's showing the headline centered and correct colors. I'm not sure how to show that to you, other than cutting and pasting it to here, and its the same code as above. I'm not sure whats wrong with my version of treehouse if it's not reading the same code the same way that jsfiddle does
Philip G
14,600 PointsHave you a xampp server installed? Or how do you develop on your computer? Do you use Chrome? My idea was to lookup at the developer tools network tab why it isn't working. P.S.: At JSFiddle, when you click save you can post the browser URL.
Red Burke
2,677 PointsThis is my first programing class, I dont have xampp installed, I don't know very much about computers, just getting started. I ran into this issue a couple weeks ago and have been bashing my head into it. I got tired of it and started a c++ tutorial that uses the code bloacks workspace, but I turned my attention back to treehouse because it syncs with my local employment office. PS http://jsfiddle.net/RedGRick/n012j92n/
Philip G
14,600 PointsYou can also upload it to Treehouse Workspaces. This would be the easiest way.
Red Burke
2,677 PointsPhilip G
14,600 PointsMy mistake... I forgot to say that you first have to click preview in the code editor and then post this link, because the one you posted was the private link :) Hopeful I'm not buggy
P. S. : Help for the preview: https://teamtreehouse.com/forum/i-just-practiced-creating-my-first-webpage-but-i-dont-know-how-to-preview-it-i-can-only-see-the-default
Red Burke
2,677 PointsI dont see a preview option in fiddle, or treehouse, how bout this, its the "share" option in fiddle
http://jsfiddle.net/RedGRick/n012j92n/2/embedded/result/ http://jsfiddle.net/RedGRick/n012j92n/2/
Philip G
14,600 PointsClick the eye in the top right corner. Then a new site opens. I only need the link from the browser bar.
Red Burke
2,677 PointsRed Burke
2,677 PointsRed Burke
2,677 PointsPhilip G
14,600 PointsThis is the right link. How does the file structure look like at workspaces/where did you save the css?(maybe a screenshot) I already tried the most possible css names but didn't find it.
Philip G
14,600 PointsI found it! Simply replace new.css with main.css Attention: This file is currently empty at workspaces.
Red Burke
2,677 PointsI replaced new with main; still nothing on my end. I took a screen shot, how is the best way to sent you the .png?
Philip G
14,600 PointsSimply send it to me via email or upload it to imghost.us But I think the problem is that the main.css file is empty. Simply post your css into it.
Red Burke
2,677 Pointsyup! fixed it! Alternately, i decided to rename the folder "css"
Red Burke
2,677 PointsThanks!!!
Philip G
14,600 PointsGlad to help! To make it easier for others to find unanswered questions, please mark one Best Answer.
Ben Dietrich
8,287 PointsBen Dietrich
8,287 PointsRed,
Can you add your html? The issue will reside in the head section of your index.html file. Thanks!