|
|
|
|
![]() ![]() |
Feb 23 2005, 11:19 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 339 Joined: 2-December 04 From: Atlanta, GA Member No.: 2,516 |
I need to know how to take an image, and make it a link. Simple? Yeah, But I forgot the tag, and can't find it anywhere. (Don't get smart with me and say to google it either, cuz I've googled it more times then you've searched for any ONE thing... don't attempt it.)
HELP PLEASE Pandaz. |
|
|
|
Feb 23 2005, 11:34 PM
Post
#2
|
|
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 377 Joined: 28-December 04 From: USA Member No.: 2,992 |
This is a test page
CODE <html> <body> <p> You can also use an image as a link: <a href="lastpage.htm"> <img src="angry.gif" alt="Go to last page" width="32" height="32" border="0" /> </a> </p> </body> </html> Replace the image with one you have.. It took 2 seconds to Google... here is a great link for resources. http://www.w3schools.com/tags/tag_img.asp Nils |
|
|
|
Feb 24 2005, 12:51 AM
Post
#3
|
|
|
Member [Level 2] ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 79 Joined: 12-January 05 Member No.: 3,251 |
You can also use the <map> tag and simply define the map to be the whole image. This eliminates the blue highlight that the <a> tag frequently places around images. The format is as follows: <map name = "label"><area shape = "type" coords = "*" href = "url"></area>. Make label the label for your map, make type "circle" for a circle, "rect" for a rectangle, or "poly" for any other polygon. If type is "circle", coords takes the format "x, y, r" where (x, y) is the center point and r is the radius. If type is "rect", coords takes the format "x1, y1, x2, y2" where (x1, y1) is the upper left, corner and (x2, y2) is the lower right corner. If type is "poly", coords takes the format "x1, y1, x2, y2, x3, y3, ..., xn, yn" where every (x, y) pair is one coordinate of one of the polygons points. Then use an <img> tag with a format like this: <img src ="yourimage.gif" usemap = "#label"> .
|
|
|
|
Feb 24 2005, 07:12 PM
Post
#4
|
|
|
Owner of Sub-Zero ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 159 Joined: 17-November 04 Member No.: 2,325 |
I like the map idea from the poster above. It makes your site look extremely nice! However, NilsC is correct about the fact that you can just use the href tags and insert an image inbetween the beginning and end. However, don't forget to make the image say where it leads to somewhere on it!
|
|
|
|
Feb 24 2005, 08:04 PM
Post
#5
|
|
|
Administrator ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 377 Joined: 28-December 04 From: USA Member No.: 2,992 |
I like the image map when I have an image for menu options. I agree that you can define the map to be the whole image... That is a good idea when you don't want the blue highlight around the image. Sometimes that blue highlight show that the image is a link and not just another image.
It's nice to use the logo image with the map feature. Then anyone clicking the logo are brought back to the index page. I know I don't want a blue highlight around my logo. vizskywalker, thanks for the map information. I'll be using more of that Nils |
|
|
|
Feb 24 2005, 08:39 PM
Post
#6
|
|
|
Member [Level 2] ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 79 Joined: 12-January 05 Member No.: 3,251 |
I'm glad you brought it up because I had forgotten the <map> tag even existed.
|
|
|
|
Feb 26 2005, 11:31 PM
Post
#7
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 629 Joined: 26-February 05 Member No.: 3,995 |
I think to get rid of the border around an image that you used <a> on you can just specify border="0". For example:
<a href="nextpage"><img src="nextpage.gif" border="0"></a> I haven't really tested it that much, though. Just in one of w3schools's TryIt boxes. |
|
|
|
Feb 27 2005, 01:03 AM
Post
#8
|
|
|
Member [Level 2] ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 79 Joined: 12-January 05 Member No.: 3,251 |
Yup, setting border equal to zero in an <a> tag does remove the border, thanks for the heads up. That makes the map only useful if you have one image you want split up.
|
|
|
|
Feb 27 2005, 11:58 PM
Post
#9
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: Members Posts: 55 Joined: 26-February 05 Member No.: 3,996 |
Just do the normal link stuff <a href="#">then where you would normall put text like this......you put <img src="#" width=# height=#></a>
That should be about all you need |
|
|
|