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 trialJacob Thomson
757 PointsNeed help with HTML
Lets say i have a 'about' button in my nav, and an about section further down my one page website. I want is so when visitors come on my page they can click my 'about' button, and it will automatically scroll them down to my 'about' section. Please help me with this! Cannot find help anywhere else. Thanks a lot.
My about section is actually a photo, as is all of my webpage. I have sliced up a psd file and saved it as a html file. Where would i put the 'anchor'?
My button is
<td rowspan="3"> <img src="images/sitelayout_06.jpg" width="60" height="59" alt=""></td>
and my about section is
<td colspan="4"> <img src="images/sitelayout_28.jpg" width="175" height="64" alt=""></td>
2 Answers
Alex Devero
24,526 PointsHi Jacob, wrap the button inside <a> tag and use id of the "about" section as value for href attribute. Remember to include the "#" in href for <a> tag. button: <br/>
<a href="#about" ><img src="images/sitelayout_06.jpg" width="60" height="59" alt=""></a>
section: <br/>
<img id="about" src="images/sitelayout_28.jpg" width="175" height="64" alt="">
Alex Devero
24,526 Points:-) I'm glad it worked.
Jacob Thomson
757 PointsJacob Thomson
757 PointsYou're an absolute champion!