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 trialNate Pezzillo
2,325 Pointsparagraph text and image are linked to contact page
The link I created for facebook works fine, but the image and paragraph text on my about page is linked to my contact page. I'm not sure why this is happening.
3 Answers
Justin Warren
7,805 PointsFeel free to post a code snippet too! Thanks
Nate Pezzillo
2,325 Pointsthank you for the response @kevin beall @Justin warren, I believe I have the correct syntax but I'm still not sure what is happening here. I would like only the word "facebook" to be a link. Here is my code
<section> <img src= "img/CabinJazzJammin.jpg" alt= "Photo of Cabin Jazz" class= "profile-photo"> <h3>ABOUT</h3> <p>Welcome to my website.</p> <p>feel free to follow me on<a href="https://www.facebook.com">facebook<a/> </p> </section
Kevin Beall
13,828 PointsI added this code to my website and it works as desired. Maybe there is some css padding which is making the click box much bigger than needed. Hope this helps.
Ps. Also noticed that your closing anchor tag is <a/> and not </a> tried this also in my code but did not make any difference how the code worked.
Justin Warren
7,805 PointsAppears to work in my browser too. The word facebook is a link. May be worth re-submitting this question to the community with the CSS and a longer explanation! Hope this helps!
Kevin Beall
13,828 PointsKevin Beall
13,828 PointsFrom what you have said it sounds like your <a> tag is around both the <img> and the <p> tags. This should only be around the <img> if this is the only area you require to link to Facebook.
like this... <a><img></a> <p></p>