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 trialbaraa Mirghani
2,156 PointsCSS file not working in workspaces
CSS is not link with my html file ... in work space ?
5 Answers
Mark Josephsen
8,803 PointsCould you post the html for us to look at?
baraa Mirghani
2,156 Points<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Baraa | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css">
</head>
<body> <header> <a href="index.html" id="logo"> <h1>Baraa</h1> <h2>Engineer</h2></a> <nav> <ul> <li><a href="portfolio.html">portfolio</a></li> <li><a href="contact.html">contact</a></li> <li><a href="About.html">About</a></li>
</ul>
</nav>
</header> <div id="wrapper"> <section> <ul>
<li><a href="img/numbers-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>give it a try</p></a>
</li>
<li><a href="img/numbers-02.jpg">
<img src="img/numbers-02.jpg" alt="">
<p>give it a try</p></a>
</li>
<li><a href="img/numbers-06.jpg">
<img src="img/numbers-06.jpg" alt="">
<p>give it a try</p></a>
</li>
<li><a href="img/numbers-09.jpg">
<img src="img/numbers-09.jpg" alt="">
<p>give it a try</p></a>
</li>
<li><a href="img/numbers-12.jpg">
<img src="img/numbers-12.jpg" alt="">
<p>give it a try</p></a>
</li>
</ul>
</section> <footer> <a href="https://www.facebook.com/baraamrgani"><img src="img/facebook-wrap.png" alt="facebook"></a> <a href="https://twitter.com/baraaabuzaid"><img src="img/twitter-wrap.png" alt="twitter"></a> <p>Ā©2014 Baraa Abuzaid</p> </footer>
</div> </body> </html>
Wayne Priestley
19,579 PointsHi Baraa,
I don't see a head tag in your html, this is where you would link your css page to your html page. Do you have such a link? if so could you post that code so we can see it. The head tag is where you have your title, meta data, any external fonts you are using.
An example of such would be,
<!DOCTYPE html>
<html>
<head>
<title>Title Here</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
all your content here
</body>
</html>
baraa Mirghani
2,156 PointsI don't know why my code doesn't appear properly and complete in comment ... like yours.... I have basically copied and pasted all my code from the workspace
Wayne Priestley
19,579 PointsHi Baraa,
I understand, Did you put 3 back ticks then type html press enter then paste your content press enter again then 3 more back ticks?
I assume you did as some of your code appears, I don't know why other pieces would be missing but i just wanted to make sure.
Maybe there is a issue with spacing between lines of code.
baraa Mirghani
2,156 Pointshtml
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Baraa | Designer</title> <link rel="stylesheet" href="css/normalize.css">
<link href='http://fonts.googleapis.com/css?family=Philosopher:400,700,700italic|PT+Serif:400,700italic|Crimson+Text:400,700italic,600italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/main.css">
</head>
<body> <header> <a href="index.html" id="logo"> <h1>Baraa</h1> <h2>Engineer</h2></a> <nav> <ul> <li><a href="portfolio.html" class="selected">portfolio</a></li> <li><a href="contact.html">contact</a></li> <li><a href="About.html">About</a></li>
</ul>
</nav>
</header> <div id="wrapper"> <section> <ul id="gallery">
<li><a href="img/numbers-01.jpg">
<img src="img/numbers-01.jpg" alt="">
<p>give it a try</p></a>
</li>
<li><a href="img/numbers-02.jpg">
<img src="img/numbers-02.jpg" alt="">
<p>give it a try</p></a>
</li>
<li><a href="img/numbers-06.jpg">
<img src="img/numbers-06.jpg" alt="">
<p>give it a try</p></a>
</li>
<li><a href="img/numbers-09.jpg">
<img src="img/numbers-09.jpg" alt="">
<p>give it a try</p></a>
</li>
<li><a href="img/numbers-12.jpg">
<img src="img/numbers-12.jpg" alt="">
<p>give it a try</p></a>
</li>
</ul>
</section> <footer> <a href="https://www.facebook.com/baraamrgani"><img src="img/facebook-wrap.png" alt="facebook"></a> <a href="https://twitter.com/baraaabuzaid"><img src="img/twitter-wrap.png" alt="twitter"></a> <p>Ā©2014 Baraa Abuzaid</p> </footer>
</div> </body> </html>
baraa Mirghani
2,156 PointsI can't past my result correctly here I don't know why it's been modified by default ...
Wayne Priestley
19,579 PointsIf you paste all your code in normally without the back ticks (markdown) I will take a look for you and see if i can get it to display. :)
baraa Mirghani
2,156 Pointsbaraa Mirghani
2,156 Points<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Baraa | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css">
</head>