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 trialjohn larson
16,594 Pointsthis 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;
}
2 Answers
Andrea Cognini
8,459 PointsHi 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
john larson
16,594 Pointsyes, 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.
john larson
16,594 Pointsjohn larson
16,594 Pointsnvm, only half the code pasted