yandoo Posted September 12, 2008 Share Posted September 12, 2008 Hi there, I was hoping for a little help if possible...Im building a gallery on my website and it has a number of small images. I need to make it so they are hyperlinked and when clicked will present a larger version of the image. How is this done please?? Any help kindly appeciated Thanks Quote Link to comment Share on other sites More sharing options...
CroNiX Posted September 12, 2008 Share Posted September 12, 2008 <a href="largeimage.jpg"><img src="thumbnail.jpg" /></a> Quote Link to comment Share on other sites More sharing options...
yandoo Posted September 12, 2008 Author Share Posted September 12, 2008 Hi there, Thanks for the reply.. Im having little trouble with it....So far (using image i have called bar1.jpg)i have <a href="bar1.jpg"><img src="bar1.jpg" />[/url] For the URL what do i add there?? So far i have tried adding the URL to the page the small image is on....gallery.html.... Do i need to create a new page with the larger images on them>>>??? What am i doing wrong???? Usually im quite competant with html, but here little bit rusty... Please help me Thank you Quote Link to comment Share on other sites More sharing options...
yandoo Posted September 12, 2008 Author Share Posted September 12, 2008 Hi there, I managed to fix it....forgot to add images folder... One thing tho is the URL hyperlink as it shows under the image itself...is it necessary to have it? Thanks Quote Link to comment Share on other sites More sharing options...
yandoo Posted September 12, 2008 Author Share Posted September 12, 2008 Hi there...again I just removed the url and it works fine! One other thig tho if i may.. there is a border around the image itself (purple in color) can i either remove the border all together or change its color?? Thank you Quote Link to comment Share on other sites More sharing options...
CroNiX Posted September 12, 2008 Share Posted September 12, 2008 The [/url] showed up because I didn't enclose it in code tags. Please note that it should have been an end to the anchor tag as seen below. To get rid of the underline for the link: <a href="bar1.jpg" style="text-decoration:none"><img src="bar1.jpg" /></a> or it would be much better to use it in a css using a class. The style info needs to be in the <head> of your document. <style="text/css"> .nolink { text-decoration:none; } </style> <a href="bar1.jpg" class="nolink"><img src="bar1.jpg" /></a> Yes you can change the color if you wanted. You can also do this using a style sheet. Please see http://www.w3schools.com/css/css_intro.asp for more info Quote Link to comment Share on other sites More sharing options...
yandoo Posted September 13, 2008 Author Share Posted September 13, 2008 Hi there, Thank you for your help thats ACE! All seems to be working perfectly except for 1 minor detail... any text underneath the hyperlink images is automatically hyperlinked to the last image???? I need to some how try to close the tags after?? tried </a> but to no luck... Any ideas there?? Thank you Quote Link to comment Share on other sites More sharing options...
CroNiX Posted September 13, 2008 Share Posted September 13, 2008 yes, its in my above post. Look at the very end of the code line. You need the </a> Quote Link to comment Share on other sites More sharing options...
yandoo Posted September 16, 2008 Author Share Posted September 16, 2008 Thats brilliant, thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.