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

HTML

My CSS is not communicating with my HTML and I cannot figure out the code. Can anyone help ?

I have been working on building the website from the lectures and I have been keeping up, but I must have made a mistake somewhere along the way. Can anyone help ?

7 Answers

Can you copy and paste some of your code in here, so we can see it?

Did you tell your html within the head tags to look for a css page for the styles?

Hi Lucas!

Please could you post your code so I can take a look at it? If you do not know how then please refer to the Markdown Cheatsheet for some help!

-Luke

Here it is. Thank you for looking at it!

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Lucas Johnson | Designer</title> <link rel="stylesheet" href="css/normalize.css"> <link href='http://fonts.googleapis.com/css?family=Changa+One|Open+Sans:400italic,700italic,400,700,800' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/main.css"> </head> <body> <header> <a href="index.html" id="logo"> <h1>Lucas Johnson</h1> <h2>Designer</h2> </a> <nav> <ul> <li><a href="index.html" class="selected">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 id="gallery"> <li> <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt""> <p> Experimentation with color and texture</p> </a>
</li> <li> <a href="img/numbers-02.jpg"> <img src="img/numbers-02.jpg" alt""> <p> Experimentation with color and texture</p> </a>
</li> <li> <a href="img/numbers-06.jpg"> <img src="img/numbers-06.jpg" alt""> <p> Experimentation with color and texture</p> </a>
</li> <li> <a href="img/numbers-09.jpg"> <img src="img/numbers-09.jpg" alt""> <p> Experimentation with color and texture</p> </a>
</li> <li> <a href="img/numbers-12.jpg"> <img src="img/numbers-12.jpg" alt""> <p> Experimentation with color and texture</p> </a>
</li> </ul> </section> <footer> <a href="http://twitter.com/cthulu_jo"><img src="img/twitter-wrap.png" alt"twitter logo" class="social-icon"></a> <a href="http://www.facebook.com/isnotasgoodasitscrackeduptobe"><img src="img/facebook-wrap.png" alt"facebook logo" class="social-icon"></a> <p>© 2014 Lucas Johnson.</p> </footer> </div> </body> </html>

You are missing the html and head tags.

The and tags?

the html and head tags :)

I don't see any html, head, or body tags.

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Lucas Johnson | Designer</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link href='http://fonts.googleapis.com/css?family=Roboto:400,700italic|Open+Sans:600' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="css/main.css">
    <link rel="stylesheet" href="css/responsive.css">
    <meta name="viewport" content="width=device-width, initial-sclae=1.0">
  </head>

and at the end of your document close the html tag. :)

I have head and html end tags in place. The copy and past function is not adding them into the forum when i paste for some weird reason but they are there.

I have no problem puting into code the head and html tags, if you have this problem it might be because something is wrong to your code, unclosing tags or incorrect syntax. Plese check it again. :) From your code the path to the css files is correct, and it should work properly.