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 trial
andrewjc
22,185 PointsSVG images & external hyperlinks for social media buttons
Hello I'm curious to see if it is possible to make an SVG image link to a Facebook fan page when using the following code:
<!-- <object data=("img/facebook.svg") type="image/svg+xml"> -->
<!-- <a href=["facebook.svg"]> -->
<!-- [if lte IE 8 ] -->
<!-- <img src=("img/facebook.gif") [alt="Facebook"]> -->
<!--![endif]-->
<!-- </a> -->
<!-- </object> -->
Let me know!
Thank you in advance!!!
4 Answers
Mat Helme
Treehouse Guest TeacherHey Andrew Carew ,
You could always use an image tag and link it.
Example:
<a href="http://facebook.com/fanpage"><img src="image.svg" alt="facebook fanpage" /></a>
andrewjc
22,185 PointsThanks Matt!
That's what I ended up doing but I wasn't sure if I had to keep the object tags for compatibility purposes for IE.
Thanks again for the response
Mat Helme
Treehouse Guest TeacherYou can always check compatibility with browsers here:
andrewjc
22,185 PointsAwesome, thanks for the resource Matt, much appreciated.
:-)