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

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!