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.

HTML

this makes an arrow that brings the user back to the top of the page. how fun is that!

<h1 id="top">this is the top of the page</h1>
<a href="#top"><div class="arrow-up"></div></a>
<a href="#top">top</div></a>
.arrow-up {
    width: 0;
    height: 0;
    border-left: 52px solid transparent;
    border-right: 52px solid transparent;
    border-bottom: 52px solid #0f0;
    margin: 0 auto;
}

nvm, only half the code pasted

2 Answers

Hi John, in your code there's and errore here:

<a href="#top">top</div></a>

the open tag <div> is missing. Fix it with this:

<a href="#top"><div>top</div></a>

Andrea

yes, i see that now andrea, ty. I found that arrow thing and thought " I wonder if i can put the div that makes the arrow in a back to top link" and it worked! except when I was pasting it I missed opening div tag.