Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,028 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!