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!

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

General Discussion

Help My Code?

My code is on codepen so is easy to see my code. I want to make a separation space between the menus and content. Without the background color black. Have to be in grey color. http://codepen.io/felipeochman/full/GZROYZ/.


1 Answer

Maximillian Fox
Maximillian Fox
Courses Plus Student 9,236 Points

Hey there,

This doesn't directly answer your question, but something you need to fix first :)

On inspecting your HTML code, I can see that not all of the tags are properly closed. Before you get to solving the issue, make sure all your current code is well-formatted which may actually solve some issues you are having and will allow for easier styling in the long run.

For example, in your Nav section, I see you've opened a nav tag but not closed it. This might cause some funny errors down the line and CSS styling may apply incorrectly to everything beyond where the nav should have been closed.

<div class="cabecalho">
<img class="topo" src="http://i.imgur.com/b66lrjN.png" alt="Paris">
  <nav id="menu"> 
      <li><a href="#">About</a></li>
      <li><a href="#">Resume</a></li>
       <li><a href="#">Portifolio</a></li>
       <li><a href="#">Contact</a></li>
  <!--add your closing </nav> here -->

Also, make sure you include a !DOCTYPE at the start of each of your pages, so that the browser knows to treat this as HTML5. If you don't declare a doctype it may cause problems on other browsers with how the page displays, in particular earlier versions of IE.

I made the changes but yet don 't work! If you see what is wrong help me. I will Keep trying. Thanks