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

Thomas Lucero
Thomas Lucero
4,494 Points

Build a Simple Rails site - Frontend development - Layouts quiz

Challenge task 2 of 5

Add a div with the class "navbar" before the container div.

Oops! It looks like Task 1 is no longer passing. Recheck work Go to task One

Challenge task 2 of 5

Add a div with the class "navbar" before the container div.

Oops! It looks like Task 1 is no longer passing. Recheck work Go to task One

index.html.erb

<!DOCTYPE html>
<html>
  <head>
    <title>Treebook</title>
    <%= stylesheet_link_tag 'application' %>
  </head>

  <body>
    <div class="navbar">
      <div class="container">
        <%= yield %>
      </div>
    </div>
  </body>
</html>

Should this be correct or am I missing something? I can't move on to tasks 3-5 until this task passes.

1 Answer

Andrew Kiernan
Andrew Kiernan
26,892 Points

The navbar div shouldn't wrap around the rest of the code, simply come before the container div. Open and close the navbar before the container and you should be all set!