User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 426,574 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,662 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting

CSS – Imagemap - Highlight Item

Join Date: Jul 2005
Location: india
Posts: 147
Reputation: katarey is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 15
katarey's Avatar
katarey katarey is offline Offline
Junior Poster

Solution Re: CSS – Imagemap - Highlight Item

  #5  
Sep 17th, 2006
Helle There,

I hope this will help you!

for example http://www.katarey.com/forHelp

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Active Anchor</title>
<style type="text/css">
<!--
.demo  
	{
		color:#000033; 
		background-color:#f2f2f2; 
		visibility:hidden;
	}
table
	{
		border:#cccccc 1px solid;
	}

-->
</style>
<script type="text/javascript">
<!--
function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}
// -->
</script>
</head>
<body>
<img src="1.jpg" alt="test" width="300" height="150" border="0" usemap="#Map" />
<map name="Map" id="Map">
  <area shape="rect" coords="16,19,79,56" href="#1" onclick="toggleBox('demodiv',1); toggleBox('demodiv2',0); toggleBox('demodiv3',0);"/>
  <area shape="rect" coords="100,72,180,111" href="#2" onclick="toggleBox('demodiv',0); toggleBox('demodiv2',1); toggleBox('demodiv3',0);" />
  <area shape="rect" coords="210,26,280,89" href="#3" onclick="toggleBox('demodiv',0); toggleBox('demodiv2',0); toggleBox('demodiv3',1);" />
</map>
<table width="59%" border="0" cellpadding="2" cellspacing="2" bordercolor="e2e2e2">
  <tr>
    <td width="24%" align="center" valign="middle"><div ID="demodiv" class="demo">Active Anchor</div></td>
    <td width="76%" valign="middle"><a name="1" id="1"></a>Anything 1 </td>
  </tr>
  <tr>
    <td align="center" valign="middle"><div ID="demodiv2" class="demo">Active Anchor</div></td>
    <td valign="middle"><a name="2" id="2"></a>Anything 2 </td>
  </tr>
  <tr>
    <td align="center" valign="middle"><div ID="demodiv3" class="demo">Active Anchor</div></td>
    <td valign="middle"><a name="3" id="3"></a>Anything 3 </td>
  </tr>
</table>
</body>
</html>



Rahul
http://www.katarey.com
Reply With Quote  
All times are GMT -4. The time now is 9:43 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC