tags:

views:

39

answers:

3

Is there any possibility of me hyperlinking a specific part in a html page.

Suppose i have a big image, When i click on the left side i would like to hyperlink it to a partcular image and when i click in the middle to another and on the right. I want to do this without cropping the image into 3 parts.

any idea how this can be done ?

+5  A: 

The easiest way would be to use an Image Map.

Brandon
thanks you for the reply
Jayaram
What if i don't use it as an image, I have it as a background-image in the CSS file ?
Jayaram
+4  A: 

Yea, it's pretty easy, so it shouldn't take you long. The idea is to create an image map over the image. This way you can specify various coordinates in the map which reflect the coordinates on the image and choose what parts link where. Here are some links to help you out.

Image map: http://www.w3schools.com/tags/tag_map.asp

I've never tried this way: http://www.ehow.com/how_4499356_make-image-map-using-photoshop.html

I usually do it through dreamweaver: http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7c13a.html

You can do it by hand the way the first link shows, and get the coordinates in photoshop

If you have it in a background image in your css (I'm assuming you have your content in a div) put your content in a instead and wrap the span in an tag Example: <a href=""><span>CONTENT</span></a>

Phil
thank you. Those links are very useful.
Jayaram
What if i don't use it as an image, I have it as a background-image in the CSS file ?
Jayaram
If you have it in a background image in your css (I'm assuming you have your content in a div) put your content in a <span> instead and wrap the span in an <a> tag Example: <a href=""><span>CONTENT</span></a>
Phil
It doesn't seem to work that way...
Jayaram
The best bet is to use the image map
Phil
A: 

You can do this using anchor tags: First cut the image into 3 parts, then put all the parts next to each other on the page (Use <nobr> tags around them to ensure they don't get out of line). Next put <a name='spot-on-page'></a> Where you want it it jump to, then put <a href='#spot-on-page'><img src='picture1'></a> As the link to that spot. Then repeat the second part with the other 2 images.

Blake
I don't like to cut the image!
Jayaram
It's not ideal, I agree with that, but if you don't have Photoshop or another program to give you the coordinates for a image map then this way works quite well.
Blake
i get it, i have the image as a CSS background. So how is it possible now ?
Jayaram