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.

Ruby

Wayne Fonseca
Wayne Fonseca
7,796 Points

[Help] Stuck on challenge 5

Add an a tag with the class "brand" and the content "Treebook"

http://teamtreehouse.com/library/programming/build-a-simple-ruby-on-rails-application/frontend-development/layouts

===========Code=========

<!DOCTYPE html> <html> <head> <title>Treebook</title> <%= stylesheet_link_tag 'application' %> </head> <body> <div class="navbar"> <div class="navbar-inner"> <div class="container"> </div> </div> </div> <div class="container"> <%= yield %> </div> </body> </html>

7 Answers

samiff
samiff
31,206 Points

Hey Wayne, seems like maybe you're putting it in the wrong area?

<div class="navbar">
    <div class="navbar-inner">
        <div class="container">
            <a class="brand">Treebook</a>
        </div>
    </div>
</div>

And the forums use Markdown for sytnax highlighting. You can see an easy way to format entire blocks of code in this post here.

Mike White
Mike White
23,234 Points

I believe it should look something like this.

<a href="#" class="brand">Treebook</a>

You are creating an anchor tag with the class "brand" and putting "Treebook" as the content of the anchor tag. Hope this helps.

Wayne Fonseca
Wayne Fonseca
7,796 Points

Thank mike, but seems that the issue states:

There is no a tag in your navbar container. By the way, how do you paste in the codes above? I cant seem to add in my codes?

Wayne Fonseca
Wayne Fonseca
7,796 Points

Thanks Sam, and great picture :) So here is the full script but seems adding below anywhere gives me this error: "Bummer! There is no a tag in your navbar container."

<a href="#" class="brand">Treebook</a>
<!DOCTYPE html>
<html>
  <head>
    <title>Treebook</title>
    <%= stylesheet_link_tag 'application' %>
  </head>
  <body>
    <div class = "navbar">
    <div class = "navbar-inner">
        <div class = "container">
      </div>
    </div>
  </div>
    <div class = "container">
    <%= yield %>
  </div>
  </body>
</html>
samiff
samiff
31,206 Points

Thanks Wayne! That <a> needs to go between

<div class = "container">
INSERT HERE
</div>

Tried it with your code exactly and it worked fine.

Wayne Fonseca
Wayne Fonseca
7,796 Points

Booya! Thanks a bunch Sam! Kudos to you!

samiff
samiff
31,206 Points

Glad to see you got it worked out :thumbsup: Keep up the good work!