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 trial
Daniel Blom
331 PointsCode not linking to CSS
Hi i am working on the Build a Website project, and i am having problems making changes. Such as background colour change, and to make it so it dosnt have underlined text
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Daniel Blom | Graphic Design Protfolio</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<header>
<a href="index.html">
<h1>Daniel Blom</h1>
<h2>Graphic Desinger</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>
</nav>
</header>
<div id="wrapper">
<section>
<ul>
<li>
<a href="img/number-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>NAME OF IMAGE GOES HERE.</p>
</a>
</li>
<li>
<a href="img/number-02.jpg">
<img src="img/numbers-02.jpg" alt="">
<p>NAME OF IMAGE GOES HERE.</p>
</a>
</li>
<li>
<a href="img/number-06.jpg">
<img src="img/numbers-06.jpg" alt="">
<p>NAME OF IMAGE GOES HERE.</p>
</a>
</li>
<li>
<a href="img/number-09.jpg">
<img src="img/numbers-12.jpg" alt="">
<p>NAME OF IMAGE GOES HERE.</p>
</a>
</li><li>
<a href="img/number-12.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>NAME OF IMAGE GOES HERE.</p>
</a>
</li>
</ul>
</section>
<footer>
<a href="http://twitter.com/danielblom92"><img src="img/twitter-wrap.png" alt="Twitter Logo"></a>
<a href="http://facebook.com/daniel.blom"><img src="img/facebook-wrap.png" alt="Facebook Logo">
</a>
<p>© 2014 Daniel Blom.</p>
</footer>
</div>
</body> </html>
Any help on this would be muchly appreciated
7 Answers
Daniel Blom
331 Points<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Daniel Blom | Graphic Design Protfolio</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
<header>
<a href="index.html">
<h1>Daniel Blom</h1>
<h2>Graphic Desinger</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>
</nav>
</header>
<div id="wrapper">
<section>
<ul>
<li>
<a href="img/number-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>NAME OF IMAGE GOES HERE.</p>
</a>
</li>
<li>
<a href="img/number-02.jpg">
<img src="img/numbers-02.jpg" alt="">
<p>NAME OF IMAGE GOES HERE.</p>
</a>
</li>
<li>
<a href="img/number-06.jpg">
<img src="img/numbers-06.jpg" alt="">
<p>NAME OF IMAGE GOES HERE.</p>
</a>
</li>
<li>
<a href="img/number-09.jpg">
<img src="img/numbers-12.jpg" alt="">
<p>NAME OF IMAGE GOES HERE.</p>
</a>
</li><li>
<a href="img/number-12.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>NAME OF IMAGE GOES HERE.</p>
</a>
</li>
</ul>
</section>
<footer>
<a href="http://twitter.com/danielblom92"><img src="img/twitter-wrap.png" alt="Twitter Logo"></a>
<a href="http://facebook.com/daniel.blom"><img src="img/facebook-wrap.png" alt="Facebook Logo">
</a>
<p>© 2014 Daniel Blom.</p>
</footer>
</div>
</body> </html>
dan schmidt
2,576 PointsSounds like it could be a couple things:
Your web page is not linking to the css correctly, review the section regarding using the
linkelement in your html'sheadelement to ensure you are referring to the css files correctly.Errors in your css. You may not be targeting elements correctly, you may have spelling errors, you may not be terminating declarations or blocks, etc
You could include the link to your page from your workspace so others can take a look at your sources.
Daniel Blom
331 PointsHi Dan.
Thanks for the reply, here is a link to my workspace.
http://teamtreehouse.com/workspaces/100592
I still havnt been able to resolve the issue, if theres any way you could point out where ive gone wrong it would be much appreciated.
Thanks.
dan schmidt
2,576 PointsI cannot view your code this way. That was my misunderstanding regarding how treehouse workspaces work.
You'll need to paste your code somewhere online to share it.
Daniel Blom
331 PointsHi Dan
https://gist.github.com/anonymous/9781351
Hopefully this will help, i have created a file called Main.css and places it inside a css folder on workspaces.. following the instructions on the video of " how to build a website " however the css files do not seem to be linking, and i cannot style my background or text
Thanks.
Daniel Blom
331 PointsI took away the new line at the end of the file, and still no changes. nothing seems to link.
Daniel Blom
331 PointsISSUE SOLVED, thanks for all of your help.
Daniel Windley
656 Pointshow did you solve this issue ?
I'm having the exact same problem..
Daniel Blom
331 PointsHi Daniel.
The issue was my own stupidity, i had named the file CCS instead of CSS and when iwas creating the links i wasnt linking it to the file that held my CSS files..
I did check this a couple of times but it took a few times to actually notice where i was going wrong.