Creating only a part of the image of a link to a hot spot

I have a large image, and I want its rectangular part to be a link to the hot spot that goes "Home". Here is my code that doesn't work. Any help on what I went missing or did wrong? Thanks!

<div id="defaultPic" runat="server"> <img src="Images/boardwise-home.jpg" alt="Boardwise Home" usemap="#map" /> <map name="map" id="boardwise-home"> <area shape="rect" coords="32,23,32,105,275,105,275,23" href="~/default.aspx" title="Boardwise Home" alt="Home" /> </map> 
+4
source share
3 answers

You are trying to get your URL rewritten here with "~", which you will need to use something like this:

 <area shape="rect" coords="32,23,275,105" href="<%= ResolveUrl("~/default.aspx")" title="Home" alt="Home" /> 
+1
source

Your rectangle has too many coordinates. It should just be topleft x, y and bottom right x, y (i.e. coords = "32,23,32,105")

+3
source

I think coords should be four values ​​for shape=rect coords , for example coords="32,23,32,105"

+1
source

Source: https://habr.com/ru/post/1308390/


All Articles