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

CSS How to Make a Website Adding Pages to a Website Build the Contact Page

Aaron Rabinovitz
Aaron Rabinovitz
2,020 Points

Hi Everyone. <h3>General Information</h3> shows right underneath the <nav> with no space. Why?

Hi everyone! hope this msg finds you well. Question: the <h3>General Information</h3> shows right underneath the <nav> with no space. Why? I notice Nick's example has a space. Thanks!

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,252 Points

There's no real difference between the 2. The browser ignores all spaces in code except for a standard space between words.

The reason elements appear top to bottom in the browser is because most are block-level elements which means that they take up 100% of the width of the parent element, which could be the root element. 100.

Nick probably just put a space between the nav and the heading because of personal choice. :-)

Aaron Rabinovitz
Aaron Rabinovitz
2,020 Points

Ok thanks. How do you put the space between General Information and the ? I've tried playing with h3{ margin: 0 0 1em 0; } in main.css with no success. Thanks for your help.

William Kroger
William Kroger
4,285 Points

I had the same exact issue, and I realized that I was placing the css ID for #logo in the header element instead of within the anchor tag right after. So after your opening body tag, make sure your html looks like this:

<header>
      <a href="index.html" id="logo">

Once I did this, the h3 tag for "General Information" moved down and was no longer touching the nav. Hope this helps!